/**
 * ============================================================
 * SAATPRO WORKSPACE
 * SOP GENERATOR
 * ============================================================
 *
 * File:        sop-generator.css
 * Location:    assets/css/
 * Description: Stylesheet for the SOP Generator interface.
 * Version:     1.0.1
 * Created:     14-Aug-2026
 * Updated:     14-Aug-2026
 * Author:      SaatPro
 * Website:     https://www.saatpro.com
 *
 * ============================================================
 */


/* ============================================================
   MAIN WRAPPER
============================================================ */

.spw-sop-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 30px auto;
    padding: 20px;
    box-sizing: border-box;
    color: #1e293b;
}


/* ============================================================
   MAIN HEADER
============================================================ */

.spw-sop-header {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 35px 30px;
    margin-bottom: 25px;
    text-align: center;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.04);
}

.spw-sop-header h1 {
    margin: 12px 0 8px;
    font-size: 32px;
    line-height: 1.25;
    font-weight: 700;
    color: #0f172a;
}

.spw-sop-header p {
    max-width: 800px;
    margin: 0 auto;
    color: #64748b;
    font-size: 15px;
    line-height: 1.6;
}

.spw-sop-badge {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .7px;
    padding: 7px 13px;
    border-radius: 20px;
    background: #eef2ff;
    color: #4338ca;
}


/* ============================================================
   COMMON SECTIONS
============================================================ */

.spw-sop-ai-section,
.spw-sop-form-section {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 30px;
    margin-bottom: 25px;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.04);
}


/* ============================================================
   SECTION HEADING
============================================================ */

.spw-sop-section-heading {
    margin-bottom: 22px;
}

.spw-sop-section-heading h2 {
    margin: 0 0 7px;
    font-size: 22px;
    line-height: 1.3;
    font-weight: 700;
    color: #0f172a;
}

.spw-sop-section-heading p {
    margin: 0;
    color: #64748b;
    font-size: 14px;
    line-height: 1.6;
}


/* ============================================================
   AI SECTION
============================================================ */

.spw-sop-ai-section {
    background: linear-gradient(
        180deg,
        #ffffff 0%,
        #f8fafc 100%
    );
}

.spw-sop-ai-textarea {
    display: block;
    width: 100%;
    min-height: 190px;
    resize: vertical;
    padding: 15px 16px;
    box-sizing: border-box;

    border: 1px solid #cbd5e1;
    border-radius: 10px;

    background: #ffffff;
    color: #1e293b;

    font-family: inherit;
    font-size: 15px;
    line-height: 1.65;

    transition:
        border-color .2s ease,
        box-shadow .2s ease;
}

.spw-sop-ai-textarea::placeholder {
    color: #94a3b8;
}

.spw-sop-ai-textarea:hover {
    border-color: #94a3b8;
}

.spw-sop-ai-textarea:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, .10);
}

.spw-sop-ai-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-top: 18px;
    flex-wrap: wrap;
}

.spw-sop-ai-status {
    margin-top: 12px;
    color: #475569;
    font-size: 14px;
    line-height: 1.5;
    text-align: center;
}


/* ============================================================
   FORM GRID
============================================================ */

.spw-sop-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.spw-sop-full {
    grid-column: 1 / -1;
}


/* ============================================================
   FORM FIELDS
============================================================ */

.spw-sop-field {
    min-width: 0;
}

.spw-sop-field label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #334155;
}

.spw-sop-field label span {
    color: #dc2626;
}

.spw-sop-field input,
.spw-sop-field textarea,
.spw-sop-field select {
    display: block;
    width: 100%;
    box-sizing: border-box;

    border: 1px solid #cbd5e1;
    border-radius: 9px;

    background: #ffffff;
    color: #1e293b;

    padding: 12px 13px;

    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;

    transition:
        border-color .2s ease,
        box-shadow .2s ease,
        background .2s ease;
}

.spw-sop-field input:hover,
.spw-sop-field textarea:hover,
.spw-sop-field select:hover {
    border-color: #94a3b8;
}

.spw-sop-field input:focus,
.spw-sop-field textarea:focus,
.spw-sop-field select:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, .10);
    background: #ffffff;
}

.spw-sop-field textarea {
    resize: vertical;
    min-height: 115px;
    line-height: 1.6;
}

.spw-sop-field textarea::placeholder,
.spw-sop-field input::placeholder {
    color: #94a3b8;
}

    /* ============================================================
       AUTOCOMPLETE / TYPE-AHEAD
    ============================================================ */
    
    .spw-sop-autocomplete {
        position: relative;
        width: 100%;
    }
    
    
    .spw-sop-autocomplete input {
        width: 100%;
    }
    
    
    .spw-sop-suggestions {
        display: none;
    
        position: absolute;
    
        top: calc(100% + 4px);
        left: 0;
        right: 0;
    
        background: #ffffff;
    
        border: 1px solid #cbd5e1;
    
        border-radius: 8px;
    
        box-shadow:
            0 8px 20px rgba(15, 23, 42, 0.12);
    
        max-height: 240px;
    
        overflow-y: auto;
    
        z-index: 9999;
    }
    
    
    .spw-sop-suggestion-item {
    
        padding: 11px 14px;
    
        font-size: 14px;
    
        color: #1e293b;
    
        cursor: pointer;
    
        border-bottom: 1px solid #f1f5f9;
    
        background: #ffffff;
    
        transition:
            background 0.15s ease,
            color 0.15s ease;
    
    }
    
    
    .spw-sop-suggestion-item:last-child {
        border-bottom: none;
    }
    
    
    .spw-sop-suggestion-item:hover {
    
        background: #eef2ff;
    
        color: #4338ca;
    
    }
/* ============================================================
   BUTTON AREA
============================================================ */

.spw-sop-form-actions,
.spw-sop-output-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 28px;
}


/* ============================================================
   BUTTONS
============================================================ */

.spw-sop-primary-button,
.spw-sop-secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 150px;

    border: none;
    border-radius: 8px;

    padding: 12px 22px;

    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;

    cursor: pointer;

    transition:
        transform .15s ease,
        box-shadow .15s ease,
        background .15s ease,
        opacity .15s ease;
}

.spw-sop-primary-button {
    background: #4f46e5;
    color: #ffffff;
    box-shadow: 0 3px 8px rgba(79, 70, 229, .18);
}

.spw-sop-primary-button:hover {
    background: #4338ca;
    transform: translateY(-1px);
    box-shadow: 0 5px 12px rgba(79, 70, 229, .22);
}

.spw-sop-secondary-button {
    background: #e2e8f0;
    color: #1e293b;
}

.spw-sop-secondary-button:hover {
    background: #cbd5e1;
    transform: translateY(-1px);
}

.spw-sop-primary-button:disabled {
    opacity: .6;
    cursor: wait;
    transform: none;
}


/* ============================================================
   OUTPUT CONTAINER
============================================================ */

.spw-sop-output {
    margin-top: 30px;
}


/* ============================================================
   GENERATED SOP DOCUMENT
============================================================ */

.spw-sop-document {
    width: 100%;
    max-width: 1000px;

    margin: 20px auto 0;

    box-sizing: border-box;

    background: #ffffff;

    border: 1px solid #dbe1e8;
    border-radius: 8px;

    padding: 48px;

    box-shadow:
        0 10px 35px rgba(15, 23, 42, .07);

    color: #1e293b;
}


/* ============================================================
   DOCUMENT HEADER
============================================================ */

.spw-sop-document-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;

    gap: 30px;

    padding-bottom: 22px;

    border-bottom: 3px solid #1e40af;
}

.spw-sop-document-header h1 {
    margin: 0 0 10px;

    font-size: 28px;
    line-height: 1.25;

    font-weight: 700;

    color: #0f172a;
}

.spw-sop-document-header p {
    margin: 4px 0;

    color: #475569;

    font-size: 14px;
    line-height: 1.5;
}

.spw-sop-document-meta {
    min-width: 200px;

    text-align: right;

    color: #475569;

    font-size: 13px;
}


/* ============================================================
   DOCUMENT CONTROL TABLE
============================================================ */

.spw-sop-control-table {
    display: grid;

    grid-template-columns: repeat(3, 1fr);

    border: 1px solid #cbd5e1;

    margin: 28px 0;

    background: #ffffff;
}

.spw-sop-control-table > div {
    padding: 13px;

    border-right: 1px solid #cbd5e1;
    border-bottom: 1px solid #cbd5e1;

    min-height: 58px;

    box-sizing: border-box;
}

.spw-sop-control-table > div:nth-child(3n) {
    border-right: none;
}

.spw-sop-control-table strong {
    display: block;

    margin-bottom: 5px;

    padding: 5px 7px;

    background: #f1f5f9;

    color: #475569;

    font-size: 11px;

    text-transform: uppercase;
    letter-spacing: .4px;
}

.spw-sop-control-table span {
    color: #1e293b;
    font-size: 13px;
}


/* ============================================================
   DOCUMENT BODY
============================================================ */

        .spw-sop-document-body {
            margin-top: 25px;
        }
        
        .spw-sop-document-body h2 {
            margin: 30px 0 12px;
        
            padding: 10px 14px;
        
            border-left: 5px solid #2563eb;
        
            background: #eff6ff;
        
            color: #0f172a;
        
            font-size: 19px;
            line-height: 1.35;
        
            font-weight: 700;
        }
        
        .spw-sop-document-body p {
            margin: 0 0 14px;
        
            white-space: pre-line;
        
            color: #334155;
        
            font-size: 14px;
        
            line-height: 1.7;
        }
        .spw-sop-procedure-content {
            margin: 10px 0 20px;
        }
        .spw-sop-procedure-list {
            margin: 10px 0 20px 28px;
            padding-left: 28px;
            color: #334155;
            font-size: 14px;
            line-height: 1.7;
        }
        
        .spw-sop-procedure-list li {
            margin-bottom: 10px;
            padding-left: 8px;
        }

/* ============================================================
   APPROVAL SECTION
============================================================ */

.spw-sop-approval-section {
    margin-top: 45px;

    border-top: 2px solid #cbd5e1;

    padding-top: 22px;
}

.spw-sop-approval-section h2 {
    margin-top: 0;
}

.spw-sop-signatures {
    display: grid;

    grid-template-columns: repeat(2, 1fr);

    gap: 40px;

    margin-top: 30px;
}

.spw-sop-signatures > div {
    min-height: 75px;

    border-top: 1px solid #334155;

    padding-top: 9px;

    color: #334155;

    font-size: 13px;
}


/* ============================================================
   DOCUMENT FOOTER
============================================================ */

.spw-sop-document-footer {
    margin-top: 45px;

    padding-top: 15px;

    border-top: 1px solid #e2e8f0;

    text-align: center;

    color: #64748b;

    font-size: 12px;

    line-height: 1.5;
}


/* ============================================================
   TABLET
============================================================ */
        
        @media (max-width: 900px) {
        
            .spw-sop-wrapper {
                padding: 16px;
            }
        
            .spw-sop-document {
                padding: 35px;
            }
        
            .spw-sop-control-table {
                grid-template-columns: repeat(2, 1fr);
            }
        
            .spw-sop-control-table > div:nth-child(3n) {
                border-right: 1px solid #cbd5e1;
            }
        
            .spw-sop-control-table > div:nth-child(2n) {
                border-right: none;
            }
        }


/* ============================================================
   MOBILE
============================================================ */
    
    @media (max-width: 768px) {
    
        .spw-sop-wrapper {
            padding: 10px;
            margin: 15px auto;
        }
    
        .spw-sop-header,
        .spw-sop-ai-section,
        .spw-sop-form-section {
            padding: 22px 18px;
            border-radius: 12px;
        }
    
        .spw-sop-header h1 {
            font-size: 26px;
        }
    
        .spw-sop-grid {
            grid-template-columns: 1fr;
            gap: 18px;
        }
    
        .spw-sop-full {
            grid-column: auto;
        }
    
        .spw-sop-document {
            padding: 24px 18px;
            border-radius: 6px;
        }
    
        .spw-sop-document-header {
            flex-direction: column;
            gap: 15px;
        }
    
        .spw-sop-document-header h1 {
            font-size: 24px;
        }
    
        .spw-sop-document-meta {
            min-width: 0;
            width: 100%;
            text-align: left;
        }
    
        .spw-sop-control-table {
            grid-template-columns: 1fr;
        }
    
        .spw-sop-control-table > div,
        .spw-sop-control-table > div:nth-child(2n),
        .spw-sop-control-table > div:nth-child(3n) {
            border-right: none;
        }
    
        .spw-sop-signatures {
            grid-template-columns: 1fr;
            gap: 35px;
        }
    
        .spw-sop-form-actions,
        .spw-sop-output-actions {
            flex-direction: column;
            align-items: stretch;
        }
    
        .spw-sop-primary-button,
        .spw-sop-secondary-button {
            width: 100%;
            min-width: 0;
        }
    
        .spw-sop-ai-actions {
            flex-direction: column;
            align-items: stretch;
        }
    
        .spw-sop-ai-actions .spw-sop-primary-button,
        .spw-sop-ai-actions .spw-sop-secondary-button {
            width: 100%;
        }
    }


/* ============================================================
   PRINT
============================================================ */
        
        @media print {
        
            .spw-sop-output-actions {
                display: none !important;
            }
        
        }
/* ============================================================
   AI SOP ASSISTANT - CENTER ALIGNMENT
============================================================ */

        .spw-sop-ai-section .spw-sop-section-heading {
            text-align: center;
        }
        
        .spw-sop-ai-section .spw-sop-section-heading h2,
        .spw-sop-ai-section .spw-sop-section-heading p {
            text-align: center;
        }
        
        .spw-sop-ai-section .spw-sop-section-heading p {
            max-width: 800px;
            margin-left: auto;
            margin-right: auto;
        }
/* ============================================================
   SOP INFORMATION - CENTER ALIGNMENT
============================================================ */
        
        .spw-sop-form-section .spw-sop-section-heading {
            text-align: center;
        }
        
        .spw-sop-form-section .spw-sop-section-heading h2,
        .spw-sop-form-section .spw-sop-section-heading p {
            text-align: center;
        }
        
        .spw-sop-form-section .spw-sop-section-heading p {
            max-width: 800px;
            margin-left: auto;
            margin-right: auto;
        }
/* =====================================================
   SOP EXPORT / CUSTOMIZATION
===================================================== */

        .spw-sop-export-section {
            margin-top: 30px;
            padding: 10px 20px 30px;
            text-align: center;
        }
        
        .spw-sop-export-section h3 {
            text-align: center;
            margin-bottom: 20px;
        }
        
        .spw-sop-output-actions {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 12px;
            margin-bottom: 24px;
        }
        
        .spw-customization-prompt {
            max-width: 850px;
            margin: 0 auto;
            padding: 22px 25px;
            text-align: center;
        }
        
        .spw-customization-prompt strong {
            display: block;
            margin-bottom: 10px;
        }
        
        .spw-customization-prompt p {
            margin: 0 auto 18px;
            line-height: 1.6;
        }
        
        .spw-customization-prompt .spw-button {
            display: inline-block;
        }
        