/* assets/css/contact.css */

/* =========================================================
   General Layout
   ========================================================= */

/* Contact wrapper
   Flex container preventing horizontal overflow */
.contact-wrapper {
    display: flex;
    font-family: 'Roboto', sans-serif;
    width: 100%;
    overflow-x: hidden;
    align-items: stretch;
}

/* =========================================================
   Visual Section (Left)
   ========================================================= */

.contact-visual-section {
    background-color: var(--photo-bg);
    width: 35vw;
    min-width: 320px;
    max-width: 500px;
    min-height: 90vh;
    overflow: hidden;
    position: relative;
}

/* Image positioning
   Object-position is adjustable to focus on key elements */
.contact-visual-section>img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    position: absolute;
    bottom: 0;
    left: 0;
    filter: grayscale(100%);
    transition: transform 0.5s ease;
}

/* =========================================================
   Content Section (Right)
   ========================================================= */

/* Main content area
   Calculated width fills remaining space minus visual section */
.contact-content-section {
    width: calc(100% - 35vw);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 8%;
    box-sizing: border-box;
    margin-top: 20px;
}

/* =========================================================
   Title Block
   ========================================================= */

/* contact-title-block removed - replaced by unified-page-title */

/* =========================================================
   Info Brief & Copy Logic
   ========================================================= */

.contact-info-brief {
    margin-bottom: 3rem;
    color: var(--secondary-white-color);
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

/* Flex container for text and copy button */
.copy-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: fit-content;
    max-width: 100%;
}

/* Interactable contact link
   Supports wrapping and word breaks on small screens */
.contact-direct-link {
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--white-color);
    text-decoration: none;
    transition: opacity 0.3s ease;
    cursor: pointer;
    position: relative;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    text-align: left;
}

.contact-direct-link:hover {
    opacity: 0.8;
}

/* Hover underline effect */
.contact-direct-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: -2px;
    left: 0;
    background-color: var(--white-color);
    transition: width 0.3s ease;
}

.contact-direct-link:hover::after {
    width: 100%;
}

.contact-phone-text {
    font-size: 1.1rem;
    color: var(--secondary-white-color);
    opacity: 0.7;
    margin: 0;
}

/* Circular copy button styling */
.copy-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--secondary-white-color);
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
    cursor: pointer;
    opacity: 0.5;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.copy-btn:hover {
    opacity: 1;
    color: var(--white-color);
    border-color: var(--white-color);
    background: rgba(255, 255, 255, 0.05);
    transform: scale(1.05);
}

.copy-btn:active {
    transform: scale(0.95);
}

.copy-btn.copied {
    border-color: var(--white-color);
    color: var(--white-color);
    background: rgba(255, 255, 255, 0.1);
    animation: copy-success-pulse 0.4s ease;
    opacity: 1;
}

@keyframes copy-success-pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.3);
    }

    100% {
        transform: scale(1.1);
        box-shadow: 0 0 0 6px rgba(255, 255, 255, 0);
    }
}

/* Tooltip/Feedback for Copy */
.copy-feedback {
    font-size: 0.75rem;
    color: var(--white-color);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.copy-feedback.visible {
    opacity: 0.7;
}

/* =========================================================
   Social Icons
   ========================================================= */
.contact-social-row {
    display: flex;
    gap: 2rem;
    margin-bottom: 3rem;
}

.contact-social-row a {
    font-size: 1.5rem;
    color: var(--secondary-white-color);
    opacity: 0.5;
    transition: all 0.3s ease;
}

.contact-social-row a:hover {
    opacity: 1;
    transform: translateY(-3px);
    color: var(--white-color);
}

/* =========================================================
   Premium Zen Form Inputs
   ========================================================= */

.contact-form-container {
    width: 100%;
    max-width: 800px;
    margin: 0;
    padding: 0;
    border: none;
}

/* Override browser autofill yellow background */
.zen-input:-webkit-autofill,
.zen-input:-webkit-autofill:hover,
.zen-input:-webkit-autofill:focus,
.zen-input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px transparent inset !important;
    -webkit-text-fill-color: var(--white-color) !important;
    background-color: transparent !important;
    transition: background-color 5000s ease-in-out 0s;
}

/* Form grid layout
   Two-column structure for Name/Email, full width for others */
#zen-contact-form>div {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    width: 100%;
}

/* Input group styling
   Maintains relative positioning for labels/inputs */
.zen-group {
    position: relative;
    margin: 0;
    display: flex;
    flex-direction: column;
}

/* Full-width span for specific elements */
.zen-group:nth-child(3),
.zen-submit,
.zen-feedback,
#zen-form-feedback {
    grid-column: 1 / -1;
}

.zen-label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--secondary-white-color);
    opacity: 0.5;
    margin-bottom: 0.8rem;
    transition: opacity 0.3s;
    font-weight: 500;
}

/* Minimalist input field styling */
.zen-input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding: 10px 0;
    color: var(--white-color);
    font-family: 'Roboto', sans-serif;
    font-size: 1.1rem;
    font-weight: 300;
    outline: none;
    transition: all 0.4s ease;
    border-radius: 0;
}

/* Override Dash/Browser default invalid styles */
input.dash-input:invalid,
.zen-input:invalid {
    outline: none !important;
    box-shadow: none !important;
    border: solid grey 1px;
}

/* Focus state with gradient underline highlight */
.zen-input:focus {
    border-bottom-color: var(--white-color);
    padding-left: 10px;
    background: linear-gradient(to right, rgba(255, 255, 255, 0.05), transparent);
}

.zen-group:focus-within .zen-label {
    opacity: 1;
    color: var(--white-color);
}

/* Textarea height */
textarea.zen-input {
    min-height: 80px;
    resize: vertical;
}

/* Submit Button */
#zen-contact-form .zen-submit {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--white-color);
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.4s ease;
    margin-top: 1rem;
    margin-bottom: 2rem;
    width: fit-content;
    justify-self: start;
    padding: 12px 24px;
}

#zen-contact-form .zen-submit:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--white-color);
    letter-spacing: 4px;
    padding-left: 2.5rem;
    padding-right: 2.5rem;
}

/* Feedback Msg (legacy) */
.zen-feedback {
    display: none;
}

/* =========================================================
   Toast Notification
   ========================================================= */

.form-toast {
    position: relative;
    width: 100%;
    max-width: 800px;
    padding: 14px 20px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 400;
    letter-spacing: 0.5px;
    text-align: center;
    height: 48px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    /* Hidden state — space is always reserved */
    visibility: hidden;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 0.4s ease, transform 0.4s ease, visibility 0.4s ease;
    pointer-events: none;
}

.form-toast--visible {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.form-toast--warning {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.form-toast--sending {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.form-toast--success {
    background: rgba(80, 200, 120, 0.1);
    border: 1px solid rgba(80, 200, 120, 0.25);
    color: rgba(80, 200, 120, 0.9);
}

.form-toast--error {
    background: rgba(200, 80, 80, 0.08);
    border: 1px solid rgba(200, 80, 80, 0.2);
    color: rgba(255, 180, 180, 0.85);
}


/* =========================================================
   Responsive Logic
   ========================================================= */

/* Tablet Optimization */
@media (max-width: 1024px) {
    .contact-content-section {
        padding: 0 5%;
    }

    #zen-contact-form>div {
        gap: 1.5rem;
    }
}

/* Mobile & Vertical Layouts */
@media (max-width: 860px) {
    .contact-wrapper {
        flex-direction: column;
    }

    .contact-visual-section {
        width: 100%;
        height: 30vh;
        min-height: 200px;
        max-width: none;
    }

    .contact-content-section {
        width: 100%;
        margin: 0;
        padding: 40px 6% 60px 6%;
    }

    /* Stack grid items */
    #zen-contact-form>div {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    /* Ensure title fits */
    .contact-title-block h1 {
        font-size: 2.5rem;
    }

    .contact-title-block::after {
        left: 0;
        width: 100px;
    }

    /* Mobile specific button polish */
    #zen-contact-form .zen-submit {
        width: 100%;
        text-align: center;
        justify-self: stretch;
        margin-top: 1.5rem;
    }
}

/* Extra Small Screens */
@media (max-width: 480px) {
    .contact-title-block h1 {
        font-size: 2rem;
    }

    .contact-direct-link {
        font-size: 1rem;
    }

    .zen-input {
        padding: 15px 0;
        font-size: 1rem;
    }

    .zen-group {
        margin-bottom: 0;
    }
}

/* Landscape Mode for Phones */
@media (max-height: 600px) and (orientation: landscape) {
    .contact-visual-section {
        display: none;
    }
}

/* =========================================================
   Notification Modal
   ========================================================= */

/* Modal backdrop container */
.modal-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Dark blur overlay */
.modal-overlay-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1;
    cursor: pointer;
}

/* Content wrapper */
.modal-backdrop .viewer {
    z-index: 2;
    position: relative;
}

.modal-backdrop.show {
    opacity: 0.95;
}

body.modal-open {
    overflow: hidden;
}

.notification-box {
    background-color: #1f2020;
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 90%;
    max-width: 450px;
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    transform: scale(0.95);
    transition: transform 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.modal-backdrop.show .notification-box {
    transform: scale(1);
}

.notification-title {
    color: var(--white-color);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    font-family: 'Poppins', serif;
}

.notification-message {
    color: var(--secondary-white-color);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    font-weight: 300;
}

.notification-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.action-btn {
    padding: 12px 24px;
    width: auto;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.ok-btn {
    background-color: var(--white-color);
    color: var(--black-color);
    border: none;
    font-weight: 600;
}

.ok-btn:hover {
    background-color: #e0e0e0;
    transform: translateY(-2px);
}

/* Secondary/Cancel button */
.cancel-btn {
    background-color: transparent;
    color: var(--secondary-white-color);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.cancel-btn:hover {
    border-color: var(--white-color);
    color: var(--white-color);
}

/* =========================================================
   Mobile Image Fix
   ========================================================= */

@media (max-width: 860px) {
    .contact-visual-section {
        height: 250px;
        min-height: unset;
        width: 100%;
        overflow: hidden;
    }

    .contact-visual-section>img {
        position: relative;
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: 0% 28%;
    }
}