/* ==========================================================================
   Consultation Bar & Privacy Popup Styles
   ========================================================================== */

/* --------------------------------------------------------------------------
   Consultation Bar (Bottom Fixed)
   -------------------------------------------------------------------------- */
.consultation-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
    /* Highest priority */
    background: rgba(22, 24, 28, 0.7);
    /* Dark semi-transparent background */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    transform: translateY(100%);
    /* Initially hidden */
    transition: transform 0.5s ease-out;
}

.consultation-bar.visible {
    transform: translateY(0);
}

.consultation-bar .c-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 10px;
}

/* Input Groups */
.consultation-bar .input-group {
    position: relative;
    width: 160px;
}

.consultation-bar .input-group.wide {
    width: 200px;
}

.consultation-bar input[type="text"],
.consultation-bar input[type="tel"],
.consultation-bar select {
    width: 100%;
    height: 45px;
    background: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    padding: 0 15px;
    color: #333;
    font-size: 16px;
    outline: none;
    transition: all 0.3s;
}

.consultation-bar input[type="text"]::placeholder,
.consultation-bar input[type="tel"]::placeholder {
    color: #333;
}

.consultation-bar input[type="text"]:focus,
.consultation-bar input[type="tel"]:focus,
.consultation-bar select:focus {
    border-color: #FF6B3D;
    /* Orange focus color */
    background: #fff
}

/* Checkbox Area */
.consultation-bar .check-area {
    display: flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    margin-left: 10px;
    margin-right: 10px;
}

.consultation-bar .check-area input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
    accent-color: #FF6B3D;
}

.consultation-bar .check-area label {
    cursor: pointer;
}

.consultation-bar .btn-detail {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: underline;
    font-size: 12px;
    cursor: pointer;
    margin-left: 8px;
    padding: 0;
}

.consultation-bar .btn-detail:hover {
    color: #fff;
}

/* Submit Button */
.consultation-bar .btn-submit {
    height: 45px;
    padding: 0 30px;
    background-color: #FF6B3D;
    color: #fff;
    font-weight: 700;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 15px;
    transition: background-color 0.3s;
    white-space: nowrap;
}

.consultation-bar .btn-submit:hover {
    background-color: #e55a2b;
}

.consultation-bar .btn-submit:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    opacity: 0.7;
}

/* --------------------------------------------------------------------------
   Privacy Modal
   -------------------------------------------------------------------------- */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 100000;
    justify-content: center;
    align-items: center;
}

.modal-overlay.open {
    display: flex;
}

.modal-content {
    background-color: #fff;
    width: 90%;
    max-width: 600px;
    border-radius: 8px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    position: relative;
    animation: modalFadeIn 0.3s;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f9f9f9;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.modal-header .close-btn2 {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
}

.modal-body {
    padding: 30px;
    max-height: 70vh;
    overflow-y: auto;
}

/* Privacy Table Styles */
.p-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    font-size: 13px;
    border-top: 2px solid #333;
}

.p-table th,
.p-table td {
    padding: 12px;
    border-bottom: 1px solid #ddd;
    text-align: left;
    color: #555;
    line-height: 1.4;
}

.p-table th {
    background-color: #f5f5f5;
    font-weight: 600;
}

/* --------------------------------------------------------------------------
   Spacer for Bottom Content (To prevent footer occlusion)
   -------------------------------------------------------------------------- */
.consultation-spacer {
    display: block;
    width: 100%;
    height: 76px;
    /* Default height for desktop */
}

/* --------------------------------------------------------------------------
   Responsive Styles
   -------------------------------------------------------------------------- */
@media screen and (max-width: 1024px) {
    .consultation-spacer {
        height: 240px;
        /* Increased space for tablet layout */
    }

    .consultation-bar {
        padding: 15px 0;
    }

    .consultation-bar .c-inner {
        flex-wrap: wrap;
        justify-content: center;
    }

    .consultation-bar .input-group,
    .consultation-bar .input-group.wide {
        /*width: calc(50% - 10px);*/
        /*margin-bottom: 10px;*/
    }

    .consultation-bar .check-area {
        width: 100%;
        justify-content: center;
        margin: 10px 0;
    }

    .consultation-bar .btn-submit {
        width: 100%;
    }
}

@media screen and (max-width: 580px) {
    .consultation-spacer {
        height: 0;
    }

    .consultation-bar .c-inner {
        margin-bottom: -10px;
    }

    #footer {
        padding-bottom: 50px !important;
    }

    .consultation-bar .input-group {
        /*width: 100%;*/
        /*margin-bottom: 10px;*/
    }

    /* Expandable Area Logic */
    .consultation-expandable-area {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.5s ease-out;
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        opacity: 0;
    }

    .consultation-bar.expanded .consultation-expandable-area {
        max-height: 500px;
        opacity: 1;
        transition: max-height 0.5s ease-out, opacity 0.3s ease-in;
        margin-top: 10px;
    }
}

/* Desktop/Tablet default: display normally */
@media screen and (min-width: 581px) {
    .consultation-expandable-area {
        display: contents;
    }
}

@media screen and (max-width: 581px) {
    .modal-body {
        padding: 0;
    }
}