/* ============================================================
   DnnShakerDoorEnquiry Module Styles
   Sydenhams Branding - Responsive & Accessible
   ============================================================

   PUBLIC-FACING FORM STYLES have been moved to the shared
   component library: /Skin/Css/syd-components.css

   This file now contains ONLY:
   - Shaker-specific UI: door layout, SVG preview, info button, modal,
     dimension validation, remove-door link
   - Thank-you panel content refinements
   - Admin grid / detail view styles
   - Accessibility media queries
   ============================================================ */


/* ============================================================
   Door Specification Panel — Info Button
   ============================================================ */

.shaker-info-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    margin-left: 6px;
    padding: 0;
    border: 1px solid var(--syd-primary, #0071b9);
    background: #fff;
    color: var(--syd-primary, #0071b9);
    border-radius: 50%;
    font-family: Georgia, "Times New Roman", serif;
    font-style: italic;
    font-size: 12px;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
    vertical-align: middle;
    transition: background 0.15s, color 0.15s;
}

.shaker-info-btn:hover,
.shaker-info-btn:focus {
    background: var(--syd-primary, #0071b9);
    color: #fff;
    outline: none;
}

.shaker-info-btn:focus {
    box-shadow: 0 0 0 2px rgba(0, 113, 185, 0.25);
}


/* ============================================================
   Door Specification Panel — Info Modal
   ============================================================ */

.shaker-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.shaker-modal[hidden] {
    display: none;
}

.shaker-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
}

.shaker-modal-dialog {
    position: relative;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow: auto;
    z-index: 1;
}

.shaker-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid #eee;
    background: var(--syd-primary, #0071b9);
    color: #fff;
    border-radius: 6px 6px 0 0;
}

.shaker-modal-title {
    margin: 0;
    font-family: var(--syd-font, 'Barlow Condensed', Arial, sans-serif);
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}

.shaker-modal-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
}

.shaker-modal-close:hover,
.shaker-modal-close:focus {
    color: #fdd;
    outline: none;
}

.shaker-modal-body {
    padding: 18px;
    text-align: center;
}

.shaker-modal-image {
    max-width: 100%;
    height: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 12px;
}

.shaker-modal-text {
    margin: 0;
    font-size: 14px;
    color: var(--syd-text-body, #424242);
    text-align: left;
    line-height: 1.5;
}


/* ============================================================
   Door Specification Panel — Dimension Validation
   ============================================================ */

.shaker-dim-error {
    display: none;
    color: #d32f2f;
    font-size: 12px;
    margin-top: 3px;
    line-height: 1.3;
}

.shaker-input-error {
    border-color: #d32f2f !important;
    background-color: #fef6f6;
}

.shaker-input-error:focus {
    outline-color: #d32f2f;
    box-shadow: 0 0 0 2px rgba(211, 47, 47, 0.15);
}


/* ============================================================
   Door Specification Panel — Layout & SVG Preview
   ============================================================ */

.shaker-door-layout {
    display: flex;
    gap: 25px;
    align-items: flex-start;
}

.shaker-door-fields {
    flex: 1 1 55%;
    min-width: 300px;
}

.shaker-door-preview {
    flex: 0 0 280px;
    position: sticky;
    top: 20px;
}

.shaker-door-preview-label {
    font-family: var(--syd-font, 'Barlow Condensed', Arial, sans-serif);
    font-size: 13px;
    font-weight: 600;
    color: var(--syd-primary, #0071b9);
    margin-bottom: 8px;
    text-align: center;
}

.shaker-door-svg-container {
    background: #fafafa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 10px;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.shaker-door-svg {
    width: 100%;
    height: auto;
    max-height: 380px;
}


/* ============================================================
   Remove Door Link
   ============================================================ */

.shaker-remove-door {
    font-size: 13px;
    color: #d32f2f;
    text-decoration: none;
    font-weight: 400;
    margin-left: auto;
}

.shaker-remove-door:hover {
    text-decoration: underline;
}


/* ============================================================
   Thank You Panel — Content Layout
   (outer wrapper uses .syd-thankyou from shared library)
   ============================================================ */

.syd-thankyou .syd-thankyou-icon {
    width: 70px;
    height: 70px;
    line-height: 70px;
    border-radius: 50%;
    background: #2e7d32;
    color: #fff;
    font-size: 36px;
    margin: 0 auto 20px;
    display: block;
    text-align: center;
}

.syd-thankyou .syd-thankyou-content {
    text-align: left;
    max-width: 550px;
    margin: 0 auto;
    background: var(--syd-bg-light, #f4f4f4);
    border-radius: 6px;
    padding: 25px;
}

.syd-thankyou .syd-thankyou-content h3 {
    color: var(--syd-primary, #0071b9);
    font-family: var(--syd-font, 'Barlow Condensed', Arial, sans-serif);
    font-size: 16px;
    font-weight: 700;
    margin: 20px 0 10px;
}

.syd-thankyou .syd-thankyou-content p {
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 8px;
}


/* ============================================================
   Admin Grid Styles
   ============================================================ */

.shaker-admin-module {
    font-family: var(--syd-font, 'Barlow Condensed', Arial, sans-serif);
    font-size: 15px;
    line-height: 1.5;
    color: var(--syd-text-body, #424242);
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.shaker-admin-title {
    color: var(--syd-text-dark, #363e4c);
    font-family: var(--syd-font, 'Barlow Condensed', Arial, sans-serif);
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
    font-weight: 700;
    margin: 0 0 20px 0;
}

.shaker-admin-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: var(--syd-bg-light, #f4f4f4);
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.shaker-admin-search {
    display: flex;
    gap: 8px;
    flex: 1;
    min-width: 250px;
}

.shaker-admin-search-input {
    max-width: 350px;
    padding: 8px 12px;
    font-size: 14px;
    font-family: var(--syd-font, 'Barlow Condensed', Arial, sans-serif);
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

.shaker-admin-search-input:focus {
    border-color: var(--syd-primary, #0071b9);
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 113, 185, 0.15);
}

.shaker-admin-filter-select {
    max-width: 200px;
    padding: 8px 10px;
    font-size: 14px;
    font-family: var(--syd-font, 'Barlow Condensed', Arial, sans-serif);
    border: 1px solid #ccc;
    border-radius: 4px;
    appearance: auto;
    cursor: pointer;
}

.shaker-admin-grid-wrapper {
    overflow-x: auto;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
}

.shaker-admin-grid {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    font-family: var(--syd-font, 'Barlow Condensed', Arial, sans-serif);
}

.shaker-admin-grid-header th {
    background: var(--syd-primary, #0071b9);
    color: #fff;
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    white-space: nowrap;
}

.shaker-admin-grid-row td {
    padding: 10px 12px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.shaker-admin-grid-alt td {
    background-color: var(--syd-bg-light, #f4f4f4);
}

.shaker-admin-grid-row:hover td {
    background-color: #e8f0f8;
}

.shaker-admin-status-select {
    padding: 5px 8px;
    font-size: 12px;
    min-width: 120px;
}

.shaker-admin-action-link {
    font-size: 13px;
    color: var(--syd-primary, #0071b9);
    text-decoration: none;
    margin-right: 10px;
}

.shaker-admin-action-link:hover {
    text-decoration: underline;
}

.shaker-admin-delete-link {
    color: #d32f2f;
}

/* Paging */
.shaker-admin-paging {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 15px;
    padding: 10px 0;
}

.shaker-admin-page-info {
    font-size: 13px;
    color: #666;
}

/* Detail View */
.shaker-admin-detail {
    padding: 10px 0;
}

.shaker-admin-detail-title {
    color: var(--syd-text-dark, #363e4c);
    font-family: var(--syd-font, 'Barlow Condensed', Arial, sans-serif);
    font-size: 20px;
    font-weight: 700;
    margin: 20px 0 15px;
}

.shaker-admin-detail-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--syd-font, 'Barlow Condensed', Arial, sans-serif);
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 20px;
}

.shaker-admin-detail-table th,
.shaker-admin-detail-table td {
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
    text-align: left;
    font-size: 14px;
}

.shaker-admin-detail-table th {
    background: var(--syd-primary, #0071b9);
    color: #fff;
    font-weight: 600;
}

.shaker-admin-detail-label {
    font-weight: 600;
    color: #555;
    width: 200px;
    background: var(--syd-bg-light, #f4f4f4);
}

.shaker-admin-detail-table tr:nth-child(even) td {
    background: #fafafa;
}

.shaker-admin-message {
    display: block;
    background: #e8f5e9;
    border: 1px solid #a5d6a7;
    border-radius: 4px;
    padding: 10px 15px;
    margin: 15px 0;
    color: #2e7d32;
    font-size: 14px;
}


/* ============================================================
   Responsive — Module-Specific
   ============================================================ */

@media (max-width: 768px) {
    /* Stack door layout vertically on mobile */
    .shaker-door-layout {
        flex-direction: column;
    }

    .shaker-door-preview {
        flex: 1 1 100%;
        position: static;
        order: -1; /* Show preview above fields on mobile */
        max-width: 100%;
    }

    .shaker-door-fields {
        min-width: 100%;
    }

    .shaker-admin-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .shaker-admin-search {
        flex-direction: column;
    }

    .shaker-admin-search-input {
        max-width: 100%;
    }

    .shaker-admin-filter-select {
        max-width: 100%;
    }

    .shaker-admin-paging {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .syd-thankyou .syd-thankyou-content {
        padding: 15px;
    }
}


/* ============================================================
   Accessibility
   ============================================================ */

@media (forced-colors: active) {
    .syd-btn {
        border: 2px solid ButtonText;
    }

    .syd-input:focus {
        outline: 2px solid Highlight;
    }
}

@media (prefers-reduced-motion: reduce) {
    .syd-input,
    .syd-btn,
    .shaker-info-btn {
        transition: none;
    }
}
