/* Real Garden Online - Frontend Styles */

#garden-planner {
    display: flex;
    justify-content: flex-start;
    gap: 20px;
    width: 100%;
    max-width: 1280px;
    margin: 12px auto;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(180deg, #f9fcf9 0%, #fbfdff 100%);
    padding: 12px;
    border-radius: 10px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.06);
    align-items: flex-start; /* avoid stretching container height */
    box-sizing: border-box;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-color: #4CAF50 #edf5ec;
    scrollbar-width: thin;
}

#garden-planner::-webkit-scrollbar {
    height: 10px;
}

#garden-planner::-webkit-scrollbar-track {
    background: #edf5ec;
    border-radius: 10px;
}

#garden-planner::-webkit-scrollbar-thumb {
    background: #4CAF50;
    border-radius: 10px;
}

#garden-planner::-webkit-scrollbar-thumb:hover {
    background: #45a049;
}

#garden-left-column {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex: 0 0 auto;
}

#garden-left-column .rgo-my-top-row{
    display:flex;
    align-items:flex-start;
    gap:12px;
    margin-bottom:10px;
}

#garden-left-column .rgo-my-top-row--audio{
    width:100%;
    justify-content:space-between;
}

#garden-left-column .rgo-my-top-row--audio #rgo-audio-column{
    margin-left:auto;
}

#garden-left-column .rgo-my-top-row .rgo-mywrap-dashboard{
    margin-bottom:0;
}

#rgo-audio-column{
    flex: 0 0 132px;
    width: 132px;
    align-self: flex-start;
    margin-bottom:0;
}

#rgo-audio-column .rgo-audio-stack{
    display:flex;
    flex-direction:column;
    gap:10px;
    height:220px;
}

#rgo-audio-column .rgo-audio-btn{
    flex:1 1 0;
    width:100%;
    min-height:0;
    display:flex;
    align-items:center;
    justify-content:center;
    text-align:center;
    border-radius:10px;
    font-size:13px;
    font-weight:800;
    text-decoration:none;
    background:rgba(76, 175, 80, 0.78);
    border:1px solid rgba(76, 175, 80, 0.82);
    color:#ffffff;
    box-shadow:0 4px 12px rgba(46, 125, 50, 0.22);
    backdrop-filter: blur(1px);
}

#rgo-audio-column .rgo-audio-btn:hover{
    background:rgba(66, 153, 71, 0.88);
    border-color:rgba(66, 153, 71, 0.92);
    color:#ffffff;
}

.rgo-add-more-btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding: 10px 16px;
    border-radius: 999px;
    background:#4caf50;
    border:1px solid #4caf50;
    color:#ffffff;
    font-weight:800;
    font-size:12px;
    text-decoration:none;
    line-height:1;
    transition: all 0.2s ease;
    box-shadow:0 6px 18px rgba(76,175,80,0.28);
}
.rgo-add-more-btn:hover{
    background:#429947;
    border-color:#429947;
    box-shadow: 0 8px 18px rgba(46,125,50,0.32);
    transform: translateY(-1px);
}

/* Right-side video panel */
#video-panel { 
    flex: 0 0 234px; 
    background: #fff; 
    border: 1px solid #e0e0e0; 
    border-radius: 10px; 
    padding: 8px; 
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
#video-panel h3 { margin: 2px 0 6px; font-size: 13px; font-weight: 600; }
.video-frame { 
    position: relative; 
    width: 100%; 
    padding-bottom: 56.25%; 
    height: 0; 
    border-radius: 8px; 
    overflow: hidden; 
    background: #000; 
    border: 1px solid #d7d7d7; 
}
.video-frame iframe, .video-frame img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; cursor: pointer; }
.video-controls { margin-top: 8px; display: flex; gap: 8px; }

#video-panel .rgo-side-btn{
    width:100%;
    box-sizing:border-box;
    text-align:center;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 12px;
}
#video-panel a.rgo-side-btn{display:block}
#video-panel .video-controls .rgo-side-btn{
    width:auto;
    flex:1;
    display:flex;
    align-items:center;
    justify-content:center;
}

@media (max-width: 992px) {
  #video-panel { flex: 0 0 218px; }
}
@media (max-width: 768px) {
  #garden-planner { flex-direction: column; }
  #garden-left-column .rgo-my-top-row{
    width:100%;
    flex-direction:column;
    gap:8px;
    margin-bottom:8px;
  }
  #garden-left-column .rgo-my-top-row--audio{
    justify-content:flex-start;
  }
  #rgo-audio-column{
    width:100%;
    flex:0 0 auto;
  }
  #rgo-audio-column .rgo-audio-stack{
    height:auto !important;
    flex-direction:row;
  }
  #rgo-audio-column .rgo-audio-btn{
    min-height:42px;
  }
  #video-panel { width: 100%; flex: 0 0 auto; }
}

.plant-item {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 8px;
    margin: 6px;
    cursor: grab;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-align: center;
    min-width: 90px;
    touch-action: manipulation;
}

.plant-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    border-color: #4caf50;
}

.plant-item:active {
    cursor: grabbing;
}

.plant-item img {
    width: 43px;
    height: 43px;
    border-radius: 7px;
    margin-bottom: 6px;
    object-fit: cover;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    pointer-events: none;
}

.plant-item {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

body.rgo-touch-dragging, body.rgo-touch-dragging * {
    -webkit-user-select: none !important;
    user-select: none !important;
    -webkit-touch-callout: none !important;
}

@media (max-width: 768px) {
    #rgo-touch-ghost {
        width: 114px !important;
        height: 114px !important;
    }
}

.rgo-home-lightbox-global {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.78);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 999999;
    cursor: zoom-out;
    padding: 24px;
    box-sizing: border-box;
}

.rgo-home-lightbox-global.is-open {
    opacity: 1;
    pointer-events: all;
}

.rgo-home-lightbox-inner {
    max-width: min(1100px, 96vw);
    max-height: 90vh;
    width: 100%;
    height: auto;
    cursor: default;
    position: relative;
}

.rgo-home-lightbox-img {
    width: 100%;
    height: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 14px;
    background: rgba(255,255,255,0.02);
}

.rgo-home-lightbox-close {
    position: fixed;
    top: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 0;
    background: rgba(0,0,0,0.55);
    color: #fff;
    font-size: 28px;
    line-height: 44px;
    text-align: center;
    cursor: pointer;
    z-index: 1000000;
}

.rgo-home-lightbox-close:hover {
    background: rgba(0,0,0,0.75);
}

.rgo-home-lightbox-close:focus {
    outline: 2px solid rgba(255,255,255,0.7);
    outline-offset: 2px;
}

body.rgo-home-lightbox-open {
    overflow: hidden;
}

.plant-item.rgo-haptic-fallback {
    transform: scale(0.98);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.22), 0 6px 20px rgba(0,0,0,0.14);
}

.plant-item .name {
    font-weight: 600;
    color: #2e7d32;
    font-size: 12px;
    margin-bottom: 3px;
    white-space: normal;
    word-break: break-word;
    line-height: 1.15;
}

.plant-item .price {
    color: #ff6b35;
    font-weight: bold;
    font-size: 11px;
}

.plant-item .price.rgo-price-free {
    color: #2e7d32;
}

#garden-container {
    /* Shrink to content to remove side/bottom empty areas */
    flex: 0 0 auto;
    width: fit-content;
    background: linear-gradient(180deg, #ecf7e9 0%, #f5fbef 100%);
    border: 1px solid #9bd27a;
    border-radius: 8px;
    padding: 4px 4px 20px 4px; /* 4px on sides/top, 20px bottom */
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.5), 0 4px 10px rgba(0,0,0,0.05);
}

/* Selection bar for mobile/desktop to show the currently selected item */
#selection-bar {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    margin-bottom: 8px;
    position: sticky;
    top: 8px;
    z-index: 50;
    border: 1px dashed #9bd27a;
    border-radius: 8px;
    background: rgba(255,255,255,0.8);
}
#selection-bar.show { display: flex; }
#selection-bar .sel-icon { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; box-shadow: 0 1px 2px rgba(0,0,0,0.15); }
#selection-bar .sel-name { font-size: 12px; font-weight: 600; color: #2e7d32; }
#selection-bar .sel-cancel { margin-left: auto; background: #ef5350; color: #fff; border: none; border-radius: 6px; padding: 4px 8px; cursor: pointer; font-size: 12px; }

/* Unpaid panel: make Checkout button full width */
#rgo-unpaid-total-wrap > div:last-child {
    justify-content: stretch !important;
}
#rgo-unpaid-total-wrap #save-garden {
    width: 100%;
    display: block;
}

#garden-grid {
    display: grid;
    /* 6x layout baseline; cell count comes from data-rows/data-cols, but
       overall footprint stays roughly constant so different garden sizes look similar */
    grid-template-columns: repeat(6, 72px);
    gap: 12px 12px;
    align-items: stretch;
    justify-content: start; /* align grid to left so container hugs the frame */
    width: 492px; /* 6 * 72px + 5 * 12px gap */
}

.garden-plot {
    /* Responsive square cells */
    width: 100%;
    aspect-ratio: 1 / 1;
    border: 2px solid #4caf50;
    border-radius: 8px;
    /* Subtle soil texture using layered gradients */
    background:
      radial-gradient(12px 12px at 20% 20%, rgba(0,0,0,0.05) 20%, transparent 21%) 0 0 / 24px 24px,
      radial-gradient(12px 12px at 80% 60%, rgba(0,0,0,0.04) 15%, transparent 16%) 0 0 / 28px 28px,
      linear-gradient(135deg, #f1f8e9 0%, #dcedc8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: transform 0.12s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.08), 0 1px 0 rgba(255,255,255,0.7);
    margin-bottom: 0; /* No extra space below; spacing is handled by grid gap */
    touch-action: manipulation;
}

.garden-plot .delete-btn {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 20px;
    height: 20px;
    background: #f44336;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 12px;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.2s ease;
}

.garden-plot:hover .delete-btn {
    display: flex;
}

.garden-plot .delete-btn:hover {
    background: #d32f2f;
    transform: scale(1.1);
}

.service-overlay {
    position: absolute;
    top: 4px;
    right: 4px;
    z-index: 10;
    background: rgba(255,255,255,0.92);
    border-radius: 50%;
    padding: 3px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* Hide remove button by default; show on hover/focus */
.service-overlay .remove-service {
    display: none !important;
}
.service-overlay:hover .remove-service,
.service-overlay:focus-within .remove-service {
    display: block !important;
}

.garden-plot:hover {
    border-color: #3fa94a;
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.12), 0 2px 8px rgba(63,169,74,0.15);
}

.garden-plot.drag-over {
    border-color: #2e7d32;
    transform: scale(1.03);
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.15), 0 4px 10px rgba(46,125,50,0.2);
}

.garden-plot .plant {
    width: 85%;
    height: 85%;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
}

.garden-plot .plant img {
    width: 100%;
    height: 100%;
    border-radius: 6px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.15);
    object-fit: contain;
}

.plant-item.rgo-owner-item {
    border-color: #9ccf9f;
    background: #f6fbf6;
}

.plant-item.rgo-owner-item .rgo-owner-swatch {
    width: 100%;
    min-height: 52px;
    border-radius: 8px;
    border: 1px solid rgba(0,0,0,0.12);
    margin-bottom: 6px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.35);
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    overflow: hidden;
    padding: 4px 6px;
}

.plant-item.rgo-owner-item .rgo-owner-swatch .rgo-owner-swatch-label {
    display: inline-block;
    width: 100%;
    text-align: center;
    font-size: 10px;
    line-height: 1.15;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.75);
    background: rgba(0,0,0,0.30);
    border-radius: 6px;
    padding: 2px 4px;
}

.plant-item.rgo-owner-item .name {
    display: none;
}

.garden-plot .plant.rgo-owner-block {
    width: calc(100% - 4px);
    height: calc(100% - 4px);
    border-radius: 8px;
    border: 1px dashed rgba(255,255,255,0.7);
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.08);
}

.garden-plot .plant .name,
.garden-plot .plant .price {
    display: none;
}

#plant-column {
    flex: 0 0 auto;
    width: 100%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#plant-menu {
    flex: 0 0 auto;
    width: 100%;
    max-width: none;
    background: #ffffff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 20px;
    max-height: 640px;
    overflow-y: auto;
    box-shadow: 0 6px 16px rgba(0,0,0,0.06);
}

/* Visible scrollbar hint for plant list panel (desktop/tablet) */
#plant-menu::-webkit-scrollbar { width: 8px; }
#plant-menu::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 6px; }
#plant-menu::-webkit-scrollbar-thumb { background: #4CAF50; border-radius: 6px; }
#plant-menu::-webkit-scrollbar-thumb:hover { background: #45a049; }
#plant-menu { scrollbar-color: #4CAF50 #f1f1f1; scrollbar-width: thin; }

/* Explicit green scrollbar also for the internal plant grid, so skrollējamība ir skaidri redzama */
#plant-list::-webkit-scrollbar { width: 8px; }
#plant-list::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 6px; }
#plant-list::-webkit-scrollbar-thumb { background: #4CAF50; border-radius: 6px; }
#plant-list::-webkit-scrollbar-thumb:hover { background: #45a049; }
#plant-list { scrollbar-color: #4CAF50 #f1f1f1; scrollbar-width: thin; }

#plant-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 20px;
}

.category-btn {
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    background: white;
    border-radius: 18px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.25s ease;
}

.category-btn:hover, .category-btn.active {
    background: #4caf50;
    color: white;
    border-color: #4caf50;
    box-shadow: 0 2px 8px rgba(76,175,80,0.25);
}

#plant-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    width: 100%;
    margin-bottom: 20px;
}

.plant-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: grab;
    transition: all 0.3s ease;
    background: white;
}

.plant-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.plant-item:active {
    cursor: grabbing;
}

.plant-item img {
    width: 40px;
    height: 40px;
    margin-bottom: 6px;
    border-radius: 6px;
}

.plant-item .name {
    font-size: 10px;
    text-align: center;
    font-weight: bold;
}

.plant-item .price {
    font-size: 9px;
    color: #666;
}

#garden-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#garden-actions-panel{
    width:100%;
    background:#ffffff;
    border:1px solid #e8e8e8;
    border-radius:12px;
    padding:12px;
    box-shadow:0 6px 16px rgba(0,0,0,0.06);
}

.btn {
    padding: 10px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-primary { background: #4caf50; color: white; }
.btn-secondary { background: #2196f3; color: white; }
.btn-danger { background: #f44336; color: white; }
.btn-info { background: #ff9800; color: white; }

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.18);
}

/* Responsive grid breakpoints */
@media (max-width: 1200px) {
  #garden-grid { grid-template-columns: repeat(6, 64px); gap: 10px; width: 434px; /* 6*64 + 5*10 */ }
}
@media (max-width: 992px) {
  #garden-grid { grid-template-columns: repeat(6, 56px); gap: 10px; width: 386px; /* 6*56 + 5*10 */ }
}
@media (max-width: 768px) {
  #garden-planner { flex-direction: column; padding: 8px 4px; gap: 12px; align-items: stretch; }
  #garden-left-column { width: 100%; }
  #garden-container { padding: 4px 4px 20px 4px; border-radius: 8px; width: 100%; }
  /* On smaller screens ļaujam visai lapai skrollēties, nevis tikai iekš #plant-menu,
     lai lietotājs varētu skrollēt līdz pašai lapas augšai arī tad, ja pirksts ir virs augu saraksta */
  #plant-menu {
    width: 100%;
    max-width: none;
    max-height: none;
    overflow-y: visible;
  }
  #plant-column{
    width:100%;
    max-width:none;
  }
  #garden-actions-panel{
    width:100%;
    box-sizing:border-box;
  }
  /* On phones, let the grid use full width while keeping a 4-column layout baseline */
  #garden-grid { grid-template-columns: repeat(4, 1fr); gap: 10px; width: 100%; }
  /* Shorten long names in mobile sidebar */
  .plant-item .name,
  .service-item .name,
  #plant-menu .plant-item .name,
  #service-menu .plant-item .name {
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
    display: inline-block;
    vertical-align: middle;
  }
}
@media (max-width: 480px) {
  #garden-planner { padding: 6px 2px; gap: 10px; }
  #garden-left-column { width: 100%; }
  #garden-container { padding: 4px 4px 20px 4px; }
  #garden-grid { grid-template-columns: repeat(4, 1fr); gap: 8px; }
  /* Even smaller names on very small phones */
  .plant-item .name,
  .service-item .name,
  #plant-menu .plant-item .name,
  #service-menu .plant-item .name {
    font-size: 11px;
    max-width: 100px;
  }
}

/* Admin Styles */
.season-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
}

.season-spring { background: #fff3cd; color: #856404; }
.season-summer { background: #d4edda; color: #155724; }
.season-autumn { background: #f8d7da; color: #721c24; }
.season-winter { background: #d1ecf1; color: #0c5460; }

.status-pending { color: #856404; }
.status-completed { color: #155724; }
.status-cancelled { color: #721c24; }

/* Service Modal Styles */
#service-modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 600px;
    border-radius: 5px;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: black;
}

/* Success notification styles */
.success-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease-in-out;
}

.success-notification.show {
    opacity: 1;
    transform: translateX(0);
}

.success-content {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 16px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 300px;
    border-left: 4px solid #2E7D32;
}

/* Live Chat Styles */
#rgo-chatbar {
    margin: 12px 0 6px 0;
    text-align: center;
}

#rgo-chat-toggle {
    position: relative;
}

#rgo-chat-toggle .unread-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #f44336;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

#rgo-livechat {
    margin: 8px 0;
    display: none;
}

#rgo-livechat h3 {
    margin: 0 0 8px 0;
    font-size: 13px;
    font-weight: 600;
    color: #2e7d32;
    display: flex;
    align-items: center;
    gap: 6px;
}

#rgo-chat-thread {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #e2e2e2;
    border-radius: 8px;
    padding: 8px;
    background: #fafafa;
    font-size: 11px;
    line-height: 1.4;
}

#rgo-chat-thread::-webkit-scrollbar {
    width: 6px;
}

#rgo-chat-thread::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

#rgo-chat-thread::-webkit-scrollbar-thumb {
    background: #4CAF50;
    border-radius: 3px;
}

#rgo-chat-thread::-webkit-scrollbar-thumb:hover {
    background: #45a049;
}

#rgo-chat-form {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
}

#rgo-chat-msg {
    width: 100%;
    height: 50px;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 11px;
    resize: vertical;
    font-family: inherit;
    transition: border-color 0.2s ease;
}

#rgo-chat-msg:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.1);
}

#rgo-chat-img {
    font-size: 10px;
    padding: 4px;
}

#rgo-chat-send {
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.rgo-mycard .share-btn{
    position:absolute;
    top:6px;
    left:6px;
    background:#fff;
    border-radius:16px;
    border:1px solid #d0d0d0;
    padding:2px 7px;
    font-size:12px;
    line-height:18px;
    color:#2271b1;
    cursor:pointer;
    box-shadow:0 1px 4px rgba(0,0,0,.15);
    transition:all 0.2s ease
}

.rgo-mycard .share-btn:hover{
    background:#e7f3ff;
    border-color:#2271b1;
    transform:scale(1.1)
}

.rgo-mycard .rm{
    position:absolute;
    top:6px;
    right:6px;
    background:#fff;
    border-radius:16px;
    border:1px solid #d0d0d0;
    padding:2px 7px;
    font-size:12px;
    line-height:18px;
    color:#a00;
    cursor:pointer;
    box-shadow:0 1px 4px rgba(0,0,0,.15)
}

.rgo-mycard .rm:hover{
    background:#ffecec;
    border-color:#e0b4b4
}

#rgo-chat-send:hover {
    background: #45a049;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(76, 175, 80, 0.3);
}

#rgo-chat-send:active {
    transform: translateY(0);
}

.chat-message {
    margin: 6px 0;
    padding: 6px 8px;
    border-radius: 6px;
    background: white;
    border-left: 3px solid #4CAF50;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.chat-message-header {
    font-size: 10px;
    color: #666;
    margin-bottom: 3px;
    font-weight: 600;
}

.chat-message-admin {
    border-left-color: #2196F3;
}

.chat-message img {
    max-width: 100%;
    border-radius: 4px;
    margin-top: 4px;
    border: 1px solid #ddd;
}

.typing-indicator {
    display: none;
    padding: 8px 12px;
    margin: 6px 0;
    background: #f0f0f0;
    border-radius: 18px;
    width: fit-content;
    align-items: center;
    gap: 4px;
}

.typing-indicator.show {
    display: flex;
}

.typing-indicator span {
    font-size: 10px;
    color: #666;
    font-style: italic;
}

.typing-indicator .dot {
    width: 6px;
    height: 6px;
    background: #999;
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.typing-indicator .dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator .dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.7; }
    30% { transform: translateY(-6px); opacity: 1; }
}

/* Toast Notifications */
#rgo-toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 350px;
}

.rgo-toast {
    background: white;
    border-radius: 8px;
    padding: 16px 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideInRight 0.3s ease;
    border-left: 4px solid #4caf50;
}

.rgo-toast.success {
    border-left-color: #4caf50;
}

.rgo-toast.error {
    border-left-color: #f44336;
}

.rgo-toast.warning {
    border-left-color: #ff9800;
}

.rgo-toast.info {
    border-left-color: #2196f3;
}

.rgo-toast-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.rgo-toast.success .rgo-toast-icon::before { content: '✓'; color: #4caf50; }
.rgo-toast.error .rgo-toast-icon::before { content: '✕'; color: #f44336; }
.rgo-toast.warning .rgo-toast-icon::before { content: '⚠'; color: #ff9800; }
.rgo-toast.info .rgo-toast-icon::before { content: 'ℹ'; color: #2196f3; }

.rgo-toast-message {
    flex: 1;
    color: #333;
    font-size: 14px;
    line-height: 1.4;
}

.rgo-toast-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.rgo-toast-close:hover {
    color: #333;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

.rgo-toast.hiding {
    animation: slideOutRight 0.3s ease forwards;
}

@media (max-width: 480px) {
    #rgo-toast-container {
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

/* Loading Spinner */
.rgo-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
}

.rgo-spinner.large {
    width: 40px;
    height: 40px;
    border-width: 4px;
}

.rgo-spinner.dark {
    border-color: rgba(0,0,0,.1);
    border-top-color: #4caf50;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Skeleton Loader */
.rgo-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
    border-radius: 4px;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.rgo-skeleton-plant {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 8px;
    margin: 6px;
    min-width: 90px;
    height: 120px;
}

.rgo-skeleton-plant .skeleton-img {
    width: 43px;
    height: 43px;
    border-radius: 7px;
    margin: 0 auto 6px;
}

.rgo-skeleton-plant .skeleton-name {
    height: 14px;
    width: 80%;
    margin: 0 auto 3px;
}

.rgo-skeleton-plant .skeleton-price {
    height: 12px;
    width: 50%;
    margin: 0 auto;
}

/* Loading overlay */
.rgo-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    border-radius: 8px;
}

.rgo-loading-overlay .rgo-spinner {
    width: 40px;
    height: 40px;
    border-width: 4px;
}

/* Plant info button + modal */
.plant-item { position: relative; }

.plant-item .rgo-item-info {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 20px;
    height: 20px;
    border-radius: 999px;
    border: 1px solid rgba(0,0,0,0.15);
    background: rgba(255,255,255,0.92);
    color: #2c3e50;
    font-weight: 900;
    font-size: 12px;
    line-height: 18px;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
}

.plant-item .rgo-item-info:hover {
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.14);
}

@media (max-width: 768px) {
    .plant-item .rgo-item-info {
        width: 28px;
        height: 28px;
        font-size: 14px;
        line-height: 26px;
    }
}

.rgo-item-info-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    padding: 20px;
    box-sizing: border-box;
}

.rgo-item-info-modal.is-open {
    display: flex;
}

.rgo-item-info-modal__box {
    background: #ffffff;
    border-radius: 12px;
    max-width: 560px;
    width: 100%;
    max-height: 70vh;
    overflow: auto;
    padding: 18px 18px 16px;
    box-shadow: 0 10px 28px rgba(0,0,0,0.25);
    position: relative;
}

.rgo-item-info-modal__close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 999px;
    background: #f3f5f7;
    cursor: pointer;
    font-size: 20px;
    line-height: 32px;
    color: #2c3e50;
}

.rgo-item-info-modal__title {
    font-weight: 900;
    color: #2c3e50;
    margin: 0 40px 10px 0;
    font-size: 16px;
}

.rgo-item-info-modal__body {
    font-size: 13px;
    color: #333;
    line-height: 1.5;
}

body.rgo-modal-open {
    overflow: hidden;
}
