/**
 * Garden Detail Styles
 */

.irwd-garden-detail-container {
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0px;
}

/* Header */
.irwd-garden-detail-header {
    margin-bottom: 45px;
    display: flex;
    flex-direction: column;
    align-items: end;
}

/* Header Actions - Back and Add buttons inline */
.irwd-garden-detail-header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 32px;
}

/* Back Button - Copied from plant_detail styling */
.irwd-garden-detail-header .irwd-garden-detail-back-btn {
    font-family: "Proxima Nova";
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0;
    border: 0;
    cursor: pointer;
    border-bottom: 1px solid transparent;
    padding-bottom: 6px;
    color: #00457C;
    display: block;
    width: max-content;
    background: transparent;
}

.irwd-garden-detail-header .irwd-garden-detail-back-btn i::before {
    transform: rotate(180deg);
    font-size: 16px;
}

.irwd-garden-detail-header .irwd-garden-detail-back-btn:hover {
    color: #00457C;
    border-bottom: 1px solid #00457C;
}

.irwd-garden-detail-title {
    font-size: 32px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 16px 0;
    text-align: center;
}

.irwd-garden-detail-header .irwd-garden-detail-add-btn {
    display: block;
    padding: 14px 24px;
    background: #ffffff;
    color: #00457C;
    border-radius: 99999px;
    font-family: "Proxima Nova";
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid #00457C;
    text-transform: uppercase;
    line-height: 18px;
}

.irwd-garden-detail-add-btn:hover {
    background: #00457C;
    color: #ffffff;
}

.irwd-garden-detail-add-btn.added {
    background: #ffffff;
    color: #00457C;
}

.irwd-garden-detail-add-btn.added:hover {
    background: #00457C;
    color: #ffffff;
}

.irwd-garden-detail-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    padding: 12px 16px;
    background: #EAEAEC;
    border-radius: 8px;
    width: 100%;
}

.irwd-garden-detail-page-counter {
    font-family: "Proxima Nova";
    font-size: 14px;
    font-weight: 600;
    color: #121314;
}

.irwd-garden-detail-navigation {
    display: flex;
    gap: 8px;
}

.irwd-garden-detail-navigation .irwd-garden-detail-nav-btn {
    padding: 12px 16px;
    font-family: "Proxima Nova";
    font-size: 18px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    line-height: 24px;
}

.irwd-garden-detail-prev,
.irwd-garden-detail-next {
    background: #64748b;
    color: #ffffff;
}

.irwd-garden-detail-prev:hover:not(:disabled),
.irwd-garden-detail-next:hover:not(:disabled) {
    background: #00335C;
    color: #ffffff;
}

.irwd-garden-detail-prev:disabled,
.irwd-garden-detail-next:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
    opacity: 0.5;
}

.irwd-garden-detail-navigation .irwd-garden-detail-list-btn {
    background: #00335C;
    color: #ffffff;
}

.irwd-garden-detail-navigation .irwd-garden-detail-list-btn:hover {
    background: #00335C;
    color: #ffffff;
}

/* Hotlinks Toggle */
.irwd-garden-detail-hotlinks-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
}

.irwd-garden-detail-hotlinks-toggle label {
    font-family: "Proxima Nova";
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #121314;
    cursor: pointer;
    margin: 0;
}

.irwd-garden-detail-hotlinks-toggle input[type="checkbox"] {
    display: none;
}

.irwd-garden-detail-toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
    background: #cbd5e1;
    border-radius: 12px;
    transition: background 0.3s ease;
}

.irwd-garden-detail-toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: #ffffff;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.irwd-garden-detail-hotlinks-toggle input[type="checkbox"]:checked + .irwd-garden-detail-toggle-switch {
    background: #00335C;
}

.irwd-garden-detail-hotlinks-toggle input[type="checkbox"]:checked + .irwd-garden-detail-toggle-switch::after {
    transform: translateX(20px);
}

/* Image Container */
.irwd-garden-detail-image-container {
    position: relative;
    width: 100%;
    background: #000000;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 16px;
}

.irwd-garden-detail-image {
    display: block;
    width: 100%;
    height: auto;
}

/* Hotspots */
.irwd-garden-detail-hotspots {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.irwd-garden-detail-hotspots[data-visible="false"] {
    opacity: 0;
    pointer-events: none;
}

.irwd-garden-detail-hotspot {
    position: absolute;
    background: rgba(255, 255, 255, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.8);
    cursor: pointer;
    pointer-events: auto;
    transition: all 0.2s ease;
    padding: 0;
    min-width: 24px;
    min-height: 24px;
}

.irwd-garden-detail-hotspot:hover {
    background: rgba(255, 255, 0, 0.4);
    border-color: rgba(255, 255, 0, 1);
    transform: scale(1.1);
}

/* Educational Hotspots - Green Border */
.irwd-garden-detail-hotspot.irwd-educational-hotspot {
    border-color: #86DA6C;
}

.irwd-garden-detail-hotspot.irwd-educational-hotspot:hover {
    background: rgba(134, 218, 108, 0.3);
    border-color: #86DA6C;
}

/* Metadata Bar */
.irwd-garden-detail-metadata {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: #EAEAEC;
    border-radius: 8px;
    font-size: 14px;
    color: #121314;
    flex-wrap: wrap;
    gap: 16px;
    font-family: "Proxima Nova";
}

.irwd-garden-detail-metadata-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.irwd-garden-detail-metadata-caption {
    flex: 1;
    text-align: center;
    font-weight: 600;
}

/* Plant Preview Modal */
.irwd-plant-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.irwd-plant-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    cursor: pointer;
}

.irwd-plant-modal-content {
    position: relative;
    background: #ffffff;
    border-radius: 12px;
    padding: 80px 48px 48px;
    max-width: 500px;
    width: 90%;
    z-index: 1;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.irwd-plant-modal-content .irwd-plant-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    font-size: 32px;
    color: #121314;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    transition: color 0.2s ease;
}

.irwd-plant-modal-close:hover {
    color: #1e293b;
}

.irwd-plant-modal-body {
    text-align: left;
}

.irwd-plant-modal-body img{
    border-radius: 8px;
}

.irwd-plant-modal-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 16px;
}

.irwd-plant-modal-body .irwd-plant-modal-common {
    font-family: "Proxima Nova";
    font-size: 20px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 8px 0;
    line-height: 26px;
}

.irwd-plant-modal-body .irwd-plant-modal-botanical {
    font-family: "Proxima Nova";
    font-size: 14px;
    font-style: italic;
    color: #64748b;
    margin: 0;
    line-height: 1.4;
}

.irwd-plant-modal-body .irwd-plant-modal-button {
    font-family: "Proxima Nova";
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0;
    cursor: pointer;
    border: 0;
    border-bottom: 1px solid transparent;
    padding-bottom: 6px;
    margin-top: 24px;
    color: #00457C;
    display: block;
    width: max-content;
}

.irwd-plant-modal-body .irwd-plant-modal-button:hover {
    border-bottom: 1px solid #00457C;
    color: #00457C;
}

/* Educational Modal Adjustments */
.irwd-plant-modal.educational-modal .irwd-plant-modal-content {
    max-width: 600px;
    padding: 48px;
}

.irwd-plant-modal.educational-modal .irwd-plant-modal-common {
    font-size: 24px !important;
    font-weight: 700 !important;
    margin-bottom: 16px !important;
    text-align: center;
}

.irwd-plant-modal.educational-modal .irwd-plant-modal-botanical {
    font-style: normal !important;
    font-size: 16px !important;
    line-height: 1.6 !important;
    color: #334155 !important;
    text-align: left;
}

.irwd-plant-modal.educational-modal .irwd-plant-modal-button {
    margin: 24px auto 0;
    display: block;
    text-align: center;
}

/* Error/Empty States */
.irwd-garden-detail-error,
.irwd-garden-detail-empty {
    padding: 40px 20px;
    text-align: center;
    background: #f8fafc;
    border-radius: 8px;
    color: #64748b;
}

/* Tablet */
@media (max-width: 1023px) {
    .irwd-garden-detail-title {
        font-size: 28px;
    }

    .irwd-garden-detail-controls {
        flex-direction: column;
        align-items: center;
    }

    .irwd-garden-detail-page-counter {
        text-align: center;
    }

    .irwd-garden-detail-navigation {
        justify-content: center;
    }
}

/* Mobile */
@media (max-width: 767px) {
    .irwd-garden-detail-container {
        padding: 16px 8px;
    }

    .irwd-garden-detail-title {
        font-size: 24px;
    }

    /* Stack header actions on mobile */
    .irwd-garden-detail-header-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    .irwd-garden-detail-header .irwd-garden-detail-back-btn {
        width: 100%;
        text-align: left;
    }

    .irwd-garden-detail-header .irwd-garden-detail-add-btn {
        width: 100%;
        text-align: center;
    }

    .irwd-garden-detail-metadata {
        flex-direction: column;
        text-align: left;
        align-items: start;
        gap: 4px;
    }

    .irwd-garden-detail-metadata-caption {
        text-align: center;
    }

    .irwd-plant-modal-content {
        padding: 16px;
    }

    .irwd-plant-modal-common {
        font-size: 20px;
    }

    .irwd-plant-modal-botanical {
        font-size: 16px;
    }
}

/* Screen Reader Only Text */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}
