/* MMCOFFICE Font Face Declarations */
@font-face {
    font-family: 'MMCOFFICE';
    src: url('../fonts/MMCOFFICE-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'MMCOFFICE';
    src: url('../fonts/MMCOFFICE-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'MMCOFFICE';
    src: url('../fonts/MMCOFFICE-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'MMCOFFICE', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #000000;
    color: #ffffff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

/* Mobile-first responsive adjustments */
@media (max-width: 480px) {
    body {
        padding: 15px;
        justify-content: flex-start;
        padding-top: 30px;
    }
}

/* Background pattern */
body::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: 
        repeating-linear-gradient(
            45deg,
            #1a1a1a 0px,
            #1a1a1a 10px,
            #0f0f0f 10px,
            #0f0f0f 20px
        );
    opacity: 0.3;
    z-index: 0;
}

.container {
    width: 100%;
    max-width: 500px;
    position: relative;
    z-index: 1;
}

@media (max-width: 480px) {
    .container {
        max-width: 100%;
    }
}

/* Logo Section */
.logo-section {
    text-align: center;
    margin-bottom: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
}

@media (max-width: 480px) {
    .logo-section {
        margin-bottom: 30px;
    }
}

.logo-image {
    max-width: 200px;
    width: auto;
    height: auto;
    display: block;
    margin: 0 auto;
}

@media (max-width: 480px) {
    .logo-image {
        max-width: 150px;
    }
}

@media (max-width: 360px) {
    .logo-image {
        max-width: 120px;
    }
}

/* Form Section */
.form-container {
    background: transparent;
    padding: 0 31px;
}

@media (max-width: 480px) {
    .form-container {
        padding: 0 24px;
    }
}

.form-group {
    margin-bottom: 12px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 400;
    color: #ffffff;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 7px 16px;
    background-color: #ffffff;
    border: 1px solid #333333;
    border-radius: 4px;
    font-size: 14px;
    font-family: 'MMCOFFICE', sans-serif;
    color: #000000;
    transition: border-color 0.3s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.form-group input::placeholder {
    color: #999999;
    opacity: 1;
}

@media (max-width: 480px) {
    .form-group input,
    .form-group select {
        padding: 9px 16px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #e60012;
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23000000' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

/* Phone Input Wrapper - Combined Input */
.phone-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    background-color: #ffffff;
    border: 1px solid #333333;
    border-radius: 4px;
    overflow: hidden;
}

.country-code-prefix {
    flex-shrink: 0;
    padding: 12px 8px 12px 16px;
    font-size: 14px;
    font-family: 'MMCOFFICE', sans-serif;
    color: #000000;
    background-color: transparent;
}

.phone-number-input {
    flex: 1;
    min-width: 0;
    padding: 12px 16px;
    border: none;
    background-color: transparent;
    font-size: 14px;
    font-family: 'MMCOFFICE', sans-serif;
    color: #000000;
    outline: none;
    width: 100%;
}

.phone-number-input::placeholder {
    color: #999999;
    opacity: 1;
}

.phone-input-wrapper:focus-within {
    border-color: #e60012;
}

@media (max-width: 480px) {
    .country-code-prefix {
        padding: 14px 10px 14px 14px;
        font-size: 14px;
    }
    
    .phone-number-input {
        padding: 14px 16px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* Consent Checkbox */
.consent-group {
    margin: 30px 0;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

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

.consent-group label {
    font-family: 'MMCOFFICE', sans-serif;
    font-size: 11px;
    font-weight: 400; /* MMCOFFICE Regular */
    line-height: 1.4;
    color: #ffffff;
    cursor: pointer;
    display: block;
    max-height: calc(1.4em * 4); /* Limit to 4 lines */
    overflow: hidden;
}

@media (max-width: 480px) {
    .consent-group {
        margin: 25px 0;
        gap: 10px;
    }

    .consent-group input[type="checkbox"] {
        width: 22px;
        height: 22px;
        min-width: 22px;
        flex-shrink: 0;
    }

    .consent-group label {
        font-size: 10px;
        line-height: 1.3;
        max-height: calc(1.3em * 4); /* Limit to 4 lines on mobile */
    }
}

@media (max-width: 360px) {
    .consent-group label {
        font-size: 9px;
        line-height: 1.3;
    }
}

.consent-group a {
    color: #ffffff;
    text-decoration: underline;
    font-weight: 500;
}

.consent-group a:hover {
    color: #e60012;
}

/* Submit Button */
.submit-container {
    text-align: center;
    margin-top: 30px;
}

.submit-btn {
    background-color: #e60012;
    color: #ffffff;
    border: none;
    padding: 16px 48px;
    font-size: 14px;
    font-weight: 400; /* MMCOFFICE Regular */
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    font-family: 'MMCOFFICE', sans-serif;
    width: 100%;
    max-width: 300px;
    min-height: 48px; /* Touch-friendly minimum size */
}

@media (max-width: 480px) {
    .submit-btn {
        padding: 16px 32px;
        font-size: 13px;
        max-width: 100%;
        width: 100%;
    }
}

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

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

.submit-btn:disabled {
    background-color: #666666;
    cursor: not-allowed;
    transform: none;
}

/* Message Display */
.message {
    margin-top: 20px;
    padding: 12px 16px;
    border-radius: 4px;
    text-align: center;
    font-size: 14px;
    display: none;
}

.message.success {
    background-color: #1a5f1a;
    color: #ffffff;
    display: block;
}

.message.error {
    background-color: #5f1a1a;
    color: #ffffff;
    display: block;
}

/* Loading Spinner */
.spinner {
    display: none;
    border: 2px solid #ffffff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.submit-btn.loading .spinner {
    display: inline-block;
    margin-right: 8px;
}

/* Tablet adjustments */
@media (min-width: 481px) and (max-width: 768px) {
    .container {
        max-width: 450px;
    }

    body {
        padding: 25px;
    }
}

/* Large mobile and small tablet */
@media (min-width: 481px) and (max-width: 640px) {
    .logo-section {
        margin-bottom: 35px;
    }
}

/* Prevent text size adjustment on iOS */
@media screen and (max-width: 480px) {
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    select {
        font-size: 16px !important;
    }
}

/* Landscape mobile orientation */
@media (max-width: 768px) and (orientation: landscape) {
    body {
        padding: 15px;
        justify-content: flex-start;
        padding-top: 20px;
    }

    .logo-section {
        margin-bottom: 25px;
    }

    .logo-image {
        max-width: 120px;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .submit-btn:hover {
        transform: none;
    }

    .submit-btn:active {
        background-color: #b3000e;
        transform: scale(0.98);
    }

    .form-group input:focus,
    .form-group select:focus {
        border-width: 2px;
    }
}
