/* ================================================
   CONTACT MODAL - TomaRock
   Premium glassmorphism modal with slide-up animation
   ================================================ */

/* Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    padding: 20px;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Modal Container */
.modal-container {
    background: rgba(15, 15, 20, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    width: 100%;
    max-width: 540px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 40px;
    position: relative;
    transform: translateY(40px) scale(0.95);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow:
        0 25px 80px rgba(0, 0, 0, 0.6),
        0 0 60px rgba(255, 107, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.modal-overlay.active .modal-container {
    transform: translateY(0) scale(1);
}

/* Scrollbar styling */
.modal-container::-webkit-scrollbar {
    width: 6px;
}

.modal-container::-webkit-scrollbar-track {
    background: transparent;
}

.modal-container::-webkit-scrollbar-thumb {
    background: rgba(255, 107, 0, 0.3);
    border-radius: 3px;
}

/* Close Button */
.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.4rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    line-height: 1;
}

.modal-close:hover {
    background: rgba(255, 107, 0, 0.2);
    border-color: rgba(255, 107, 0, 0.4);
    color: #FF6B00;
    transform: rotate(90deg);
}

/* Modal Header */
.modal-header {
    text-align: center;
    margin-bottom: 32px;
}

.modal-header h2 {
    font-size: 1.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    color: var(--text-white);
}

.modal-header p {
    color: var(--text-gray, #a0a0a0);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Form Styles */
.modal-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.5);
}

.form-group label .required {
    color: #FF6B00;
    margin-left: 2px;
}

/* Input & Textarea & Select */
.form-group input,
.form-group textarea,
.form-group select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 14px 16px;
    color: var(--text-white, #fff);
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    outline: none;
    width: 100%;
    box-sizing: border-box;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: #FF6B00;
    box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.15);
    background: rgba(255, 255, 255, 0.08);
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

/* Select styling */
.form-group select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23FF6B00' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
    cursor: pointer;
}

.form-group select option {
    background: #1a1a2e;
    color: #fff;
    padding: 10px;
}

/* Checkbox Group */
.checkbox-group {
    flex-direction: row !important;
    align-items: flex-start;
    gap: 12px !important;
}

.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    min-width: 20px;
    border-radius: 6px;
    cursor: pointer;
    accent-color: #FF6B00;
    margin-top: 2px;
}

.checkbox-group label {
    font-size: 0.85rem;
    text-transform: none;
    letter-spacing: 0;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.4;
    cursor: pointer;
}

.checkbox-group label a {
    color: #FF6B00;
    text-decoration: underline;
    text-decoration-color: rgba(255, 107, 0, 0.4);
    transition: text-decoration-color 0.3s;
}

.checkbox-group label a:hover {
    text-decoration-color: #FF6B00;
}

/* Submit Button */
.btn-modal-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px 32px;
    background: linear-gradient(135deg, #FF6B00, #FF8C38);
    border: none;
    border-radius: 14px;
    color: #fff;
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(255, 107, 0, 0.3);
    margin-top: 8px;
    position: relative;
    overflow: hidden;
}

.btn-modal-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: left 0.5s ease;
}

.btn-modal-submit:hover {
    box-shadow: 0 6px 30px rgba(255, 107, 0, 0.5);
    transform: translateY(-2px);
}

.btn-modal-submit:hover::before {
    left: 100%;
}

.btn-modal-submit:active {
    transform: translateY(0);
}

.btn-modal-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Success State */
.modal-success {
    display: none;
    text-align: center;
    padding: 40px 20px;
}

.modal-success.active {
    display: block;
    animation: fadeUpModal 0.5s ease forwards;
}

.modal-success .success-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    display: block;
    animation: bounceIn 0.6s ease;
}

.modal-success h3 {
    font-size: 1.5rem;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 12px;
    color: var(--text-white);
}

.modal-success p {
    color: var(--text-gray, #a0a0a0);
    font-size: 0.95rem;
    line-height: 1.5;
}

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

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

@keyframes bounceIn {
    0% {
        transform: scale(0);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

/* ================================
   RESPONSIVE
   ================================ */
@media (max-width: 600px) {
    .modal-container {
        padding: 28px 20px;
        border-radius: 20px;
        max-height: 85vh;
    }

    .modal-header h2 {
        font-size: 1.4rem;
    }

    .modal-form {
        gap: 16px;
    }

    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 12px 14px;
        font-size: 0.9rem;
    }

    .btn-modal-submit {
        padding: 14px 24px;
        font-size: 0.9rem;
    }
}