/**
 * ==========================================================
 * SaatPro Workspace
 * Module : WBS Generator
 * File   : wbs-generator.css
 *
 * Purpose:
 * Professional responsive styling for the Work Breakdown
 * Structure Generator.
 *
 * Author : SaatPro
 * Version: 1.0.0
 * Date   : 24 August 2026
 * ==========================================================
 */


/* ==========================================================
   WBS CONTAINER
========================================================== */

.wbs-container {
    max-width: 1400px;
    margin: 30px auto;
    padding: 0 20px;
    box-sizing: border-box;
}


/* ==========================================================
   HEADER
========================================================== */

.wbs-container .spw-header {
    text-align: center;
    margin-bottom: 30px;
}

.wbs-container .spw-header h1 {
    margin: 0 0 8px;
    font-size: 32px;
    font-weight: 700;
}

.wbs-container .spw-header p {
    margin: 6px 0;
    line-height: 1.6;
}


/* ==========================================================
   COMMON SECTIONS
========================================================== */

.wbs-container .spw-ai-section,
.wbs-container .spw-form,
.wbs-container .wbs-entry-form,
.wbs-container .wbs-results,
.wbs-container .spw-output {
    background: #ffffff;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-sizing: border-box;
}

.wbs-container h2 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 23px;
}

.wbs-container h3 {
    margin-top: 0;
}


/* ==========================================================
   AI SECTION
========================================================== */

.wbs-container .wbs-ai-section {
    border: 1px solid #dbe7f3;
    background: linear-gradient(
        135deg,
        #f8fbff 0%,
        #eef6ff 100%
    );
}

.wbs-container .wbs-ai-section h2 {
    margin-bottom: 8px;
}

.wbs-container .wbs-ai-section textarea {
    width: 100%;
    min-height: 180px;
    resize: vertical;
    box-sizing: border-box;
    margin-top: 12px;
}


/* ==========================================================
   AI STATUS
========================================================== */

.wbs-container .spw-ai-status {
    min-height: 22px;
    margin-top: 12px;
    font-size: 14px;
    font-weight: 600;
}


/* ==========================================================
   FORM FIELDS
========================================================== */

.wbs-container .spw-field {
    margin-bottom: 18px;
}

.wbs-container .spw-field label {
    display: block;
    margin-bottom: 7px;
    font-weight: 600;
}

.wbs-container .spw-required {
    color: #d63638;
    margin-left: 2px;
}

.wbs-container input,
.wbs-container select,
.wbs-container textarea {
    width: 100%;
    max-width: 100%;
    padding: 11px 13px;
    border: 1px solid #ccd6e0;
    border-radius: 7px;
    background: #ffffff;
    box-sizing: border-box;
    font-size: 14px;
    line-height: 1.5;
}

.wbs-container input:focus,
.wbs-container select:focus,
.wbs-container textarea:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.10);
}

.wbs-container textarea {
    resize: vertical;
}

.wbs-container small {
    display: block;
    margin-top: 5px;
    color: #6b7280;
}


/* ==========================================================
   DATE ROW
========================================================== */

.wbs-container .wbs-date-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}


/* ==========================================================
   BUTTONS
========================================================== */

.wbs-container .spw-button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.wbs-container .spw-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 18px;
    border: 0;
    border-radius: 7px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease,
        opacity 0.15s ease;
}

.wbs-container .spw-button:hover {
    transform: translateY(-1px);
}

.wbs-container .spw-button:disabled {
    cursor: not-allowed;
    opacity: 0.65;
    transform: none;
}

.wbs-container .spw-secondary {
    background: #eef1f4;
    color: #374151;
}


/* ==========================================================
   WBS RESULTS
========================================================== */

.wbs-container .wbs-results {
    overflow: hidden;
}


/* ==========================================================
   DASHBOARD
========================================================== */

.wbs-container .wbs-dashboard {
    display: grid;
    grid-template-columns:
        repeat(5, minmax(0, 1fr));
    gap: 15px;
    margin: 20px 0 25px;
}

.wbs-container .wbs-card {
    position: relative;
    min-height: 130px;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #e1e7ee;
    background: #ffffff;
    box-sizing: border-box;
    overflow: hidden;
}

.wbs-container .wbs-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
}

.wbs-container .wbs-card h3 {
    margin: 0 0 12px;
    font-size: 15px;
    font-weight: 600;
}

.wbs-container .wbs-card .count {
    font-size: 34px;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 7px;
}

.wbs-container .wbs-card small {
    margin: 0;
    color: #6b7280;
}


/* ==========================================================
   DASHBOARD CARD ACCENTS
========================================================== */

.wbs-container .wbs-phase-card::before {
    background: #2563eb;
}

.wbs-container .wbs-deliverable-card::before {
    background: #7c3aed;
}

.wbs-container .wbs-package-card::before {
    background: #0891b2;
}

.wbs-container .wbs-activity-card::before {
    background: #059669;
}

.wbs-container .wbs-task-card::before {
    background: #d97706;
}


/* ==========================================================
   FILTER BAR
========================================================== */

.wbs-container .wbs-filter-bar {
    display: grid;
    grid-template-columns:
        minmax(250px, 1fr)
        180px
        180px;
    gap: 12px;
    margin: 15px 0 20px;
}

.wbs-container .wbs-filter-bar input,
.wbs-container .wbs-filter-bar select {
    margin: 0;
}


/* ==========================================================
   REGISTER HEADER
========================================================== */

.wbs-container .wbs-register-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 15px;
}

.wbs-container .wbs-register-header h2 {
    margin-bottom: 5px;
}

.wbs-container .wbs-register-description {
    margin: 0;
    color: #6b7280;
    line-height: 1.5;
}


/* ==========================================================
   WBS TABLE
========================================================== */

.wbs-container .wbs-table-wrapper {
    width: 100%;
    overflow-x: auto;
    border: 1px solid #e1e7ee;
    border-radius: 8px;
}

.wbs-container .wbs-table {
    width: 100%;
    min-width: 1200px;
    border-collapse: collapse;
    background: #ffffff;
}

.wbs-container .wbs-table th {
    padding: 12px 10px;
    background: #f5f7fa;
    border-bottom: 1px solid #dfe5eb;
    text-align: left;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.wbs-container .wbs-table td {
    padding: 11px 10px;
    border-bottom: 1px solid #edf0f3;
    vertical-align: top;
    font-size: 13px;
    line-height: 1.45;
}

.wbs-container .wbs-table tbody tr:hover {
    background: #fafcff;
}

.wbs-container .wbs-table tbody tr:last-child td {
    border-bottom: 0;
}


/* ==========================================================
   HIERARCHICAL TASK DISPLAY
========================================================== */

.wbs-container .wbs-task-name {
    display: inline-block;
    font-weight: 600;
}

.wbs-container .wbs-level-1 td {
    font-weight: 700;
}

.wbs-container .wbs-level-2 td {
    font-weight: 600;
}

.wbs-container .wbs-level-3 td {
    font-weight: 500;
}


/* ==========================================================
   STATUS BADGES
========================================================== */

.wbs-container .wbs-status {
    display: inline-block;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    background: #eef1f4;
    color: #374151;
}

.wbs-container .wbs-status.not-started {
    background: #f1f5f9;
    color: #475569;
}

.wbs-container .wbs-status.in-progress {
    background: #fff7ed;
    color: #9a3412;
}

.wbs-container .wbs-status.completed {
    background: #ecfdf5;
    color: #047857;
}

.wbs-container .wbs-status.on-hold {
    background: #fef2f2;
    color: #b91c1c;
}


/* ==========================================================
   TABLE ACTION BUTTONS
========================================================== */

.wbs-container .wbs-edit,
.wbs-container .wbs-delete {
    border: 0;
    background: transparent;
    padding: 5px 7px;
    margin-right: 3px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
}

.wbs-container .wbs-edit {
    color: #2271b1;
}

.wbs-container .wbs-delete {
    color: #b42318;
}

.wbs-container .wbs-edit:hover,
.wbs-container .wbs-delete:hover {
    background: #f3f4f6;
}


/* ==========================================================
   ENTRY FORM
========================================================== */

.wbs-container .wbs-entry-form {
    border: 1px solid #e1e7ee;
}

.wbs-container .wbs-entry-form h2 {
    padding-bottom: 12px;
    border-bottom: 1px solid #edf0f3;
}


/* ==========================================================
   OUTPUT DOCUMENT
========================================================== */

.wbs-container .spw-output {
    background: #eef1f4;
    padding: 20px;
}

.wbs-container .wbs-document {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px;
    background: #ffffff;
    box-sizing: border-box;
}

.wbs-container .spw-doc-header {
    text-align: center;
    margin-bottom: 35px;
    padding-bottom: 20px;
    border-bottom: 2px solid #dfe5eb;
}

.wbs-container .spw-doc-header h2 {
    margin-bottom: 8px;
    font-size: 27px;
}

.wbs-container .spw-doc-header p {
    margin: 0;
    color: #6b7280;
}


/* ==========================================================
   OUTPUT INFORMATION TABLE
========================================================== */

.wbs-container .spw-document .spw-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
}

.wbs-container .spw-document .spw-table th,
.wbs-container .spw-document .spw-table td {
    padding: 10px 12px;
    border: 1px solid #dfe5eb;
    text-align: left;
    vertical-align: top;
}

.wbs-container .spw-document .spw-table th {
    background: #f5f7fa;
    font-weight: 700;
}


/* ==========================================================
   DOCUMENT SECTION
========================================================== */

.wbs-container .spw-document h3 {
    margin-top: 30px;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e1e7ee;
}

.wbs-container .spw-section {
    margin-bottom: 25px;
    line-height: 1.7;
}


/* ==========================================================
   EXPORT TABLE
========================================================== */

.wbs-container .wbs-export-table {
    min-width: 950px;
}

.wbs-container .wbs-export-table th {
    background: #f5f7fa;
}


/* ==========================================================
   EXPORT SECTION
========================================================== */

.wbs-container .spw-export-section {
    margin-top: 35px;
    padding-top: 25px;
    border-top: 2px solid #e1e7ee;
}

.wbs-container .spw-export-section h3 {
    border: 0;
    padding: 0;
    margin-top: 0;
}


/* ==========================================================
   CUSTOMIZATION REQUEST
========================================================== */

.wbs-container .spw-customization-prompt {
    margin-top: 25px;
    padding: 20px;
    border-radius: 9px;
    border: 1px solid #dbe7f3;
    background: #f8fbff;
}

.wbs-container .spw-customization-prompt strong {
    display: block;
    margin-bottom: 6px;
}

.wbs-container .spw-customization-prompt p {
    margin: 0 0 15px;
    line-height: 1.6;
    color: #5f6b76;
}


/* ==========================================================
   CUSTOMIZATION MODAL
========================================================== */

.wbs-container .spw-customization-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
}

.wbs-container .spw-customization-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
}

.wbs-container .spw-customization-dialog {
    position: relative;
    z-index: 2;
    width: min(600px, calc(100% - 30px));
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    margin: 20px auto;
    padding: 30px;
    background: #ffffff;
    border-radius: 12px;
    box-sizing: border-box;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.20);
}

.wbs-container .spw-customization-dialog h2 {
    margin-bottom: 8px;
}

.wbs-container .spw-customization-intro {
    color: #667085;
    line-height: 1.6;
}

.wbs-container .spw-customization-close {
    position: absolute;
    top: 12px;
    right: 15px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: #f3f4f6;
    color: #374151;
    font-size: 23px;
    cursor: pointer;
}

.wbs-container .spw-customization-close:hover {
    background: #e5e7eb;
}


/* ==========================================================
   HONEYPOT
========================================================== */

.wbs-container .spw-honeypot {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}


/* ==========================================================
   CUSTOMIZATION STATUS
========================================================== */

.wbs-container .spw-customization-status {
    min-height: 22px;
    margin: 10px 0;
    font-size: 14px;
    font-weight: 600;
}


/* ==========================================================
   HORIZONTAL RULE
========================================================== */

.wbs-container hr {
    margin: 25px 0;
    border: 0;
    border-top: 1px solid #e5e7eb;
}


/* ==========================================================
   RESPONSIVE — TABLET
========================================================== */

@media (max-width: 1100px) {

    .wbs-container .wbs-dashboard {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));
    }

    .wbs-container .wbs-filter-bar {
        grid-template-columns:
            1fr 1fr;
    }

    .wbs-container .wbs-filter-bar input {
        grid-column: 1 / -1;
    }

}


/* ==========================================================
   RESPONSIVE — MOBILE
========================================================== */

@media (max-width: 767px) {

    .wbs-container {
        margin: 20px auto;
        padding: 0 12px;
    }

    .wbs-container .spw-header h1 {
        font-size: 26px;
    }

    .wbs-container .spw-ai-section,
    .wbs-container .spw-form,
    .wbs-container .wbs-entry-form,
    .wbs-container .wbs-results,
    .wbs-container .spw-output {
        padding: 18px;
    }

    .wbs-container .wbs-date-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .wbs-container .wbs-dashboard {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .wbs-container .wbs-filter-bar {
        grid-template-columns: 1fr;
    }

    .wbs-container .wbs-filter-bar input {
        grid-column: auto;
    }

    .wbs-container .wbs-register-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .wbs-container .wbs-register-header .spw-button {
        width: 100%;
    }

    .wbs-container .spw-button-group {
        flex-direction: column;
    }

    .wbs-container .spw-button-group .spw-button {
        width: 100%;
    }

    .wbs-container .wbs-document {
        padding: 20px;
    }

    .wbs-container .spw-customization-dialog {
        padding: 22px;
    }

}


/* ==========================================================
   RESPONSIVE — SMALL MOBILE
========================================================== */

@media (max-width: 480px) {

    .wbs-container .wbs-dashboard {
        grid-template-columns: 1fr;
    }

    .wbs-container .wbs-card {
        min-height: auto;
    }

    .wbs-container .wbs-card .count {
        font-size: 30px;
    }

    .wbs-container .spw-doc-header h2 {
        font-size: 22px;
    }

}


/* ==========================================================
   PRINT
========================================================== */

@media print {

    .wbs-container {
        max-width: none;
        margin: 0;
        padding: 0;
    }

    .wbs-container .no-export,
    .wbs-container .wbs-entry-form,
    .wbs-container .spw-ai-section,
    .wbs-container .spw-customization-prompt,
    .wbs-container .spw-export-section,
    .wbs-container .wbs-register-header .spw-button,
    .wbs-container .wbs-edit,
    .wbs-container .wbs-delete {
        display: none !important;
    }

    .wbs-container .spw-output {
        padding: 0;
        background: #ffffff;
    }

    .wbs-container .wbs-document {
        max-width: none;
        padding: 0;
        box-shadow: none;
    }

    .wbs-container .wbs-table-wrapper {
        overflow: visible;
        border: 0;
    }

    .wbs-container .wbs-export-table {
        min-width: 0;
    }

    .wbs-container .wbs-export-table th,
    .wbs-container .wbs-export-table td {
        font-size: 9pt;
    }

}