/* Onos OnePage Event - Scientific Clean Aesthetic (Reference Image 2 Applied) */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --onos-navy: #1B1464;        /* Deep Blue requested */
    --onos-navy-soft: #1B1464;
    --onos-primary: #6366f1;     /* Indigo accent */
    --onos-text-main: #0f172a;
    --onos-text-secondary: #64748b;
    --onos-bg: #f8fafc;
    --onos-surface: #ffffff;
    --onos-border: #1B1464;
    --onos-input-bg: #f8fafc;
    --onos-radius: 5px;          /* Sharp, structured corners requested */
    --onos-font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --onos-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

/* Base Wrapper */
.onos-event-form-wrapper {
    background: var(--onos-surface);
    padding: 3.5rem 2.5rem;
    border-radius: 5px;
    box-shadow: var(--onos-shadow);
    width: 100%;
    max-width: 600px;
    margin: 3rem auto;
    font-family: var(--onos-font-family);
    color: var(--onos-text-main);
    box-sizing: border-box;
    border: none;
    box-shadow: 0 15px 45px rgba(27, 20, 100, 0.08);
}

/* Title Styling */
.onos-event-title {
    font-size: 26px;
    font-weight: 800;
    margin: 0 0 2rem 0;
    color: var(--onos-navy);
    letter-spacing: -0.03em;
    text-align: center;
}

/* Form Groups */
.onos-form-group {
    margin-bottom: 1.8rem;
    width: 100% !important;
    box-sizing: border-box !important;
    clear: both !important;
    position: relative;
    z-index: 1;
}

.onos-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--onos-navy);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.onos-required {
    color: #dc2626;
}

/* Input Styles */
.onos-form-group input[type="text"],
.onos-form-group input[type="email"],
.onos-form-group input[type="tel"],
.onos-form-group select {
    width: 100%;
    height: 54px;
    padding: 0 18px;
    background: var(--onos-input-bg);
    border: none;
    box-shadow: inset 0 2px 5px rgba(27, 20, 100, 0.05);
    border-radius: var(--onos-radius);
    font-size: 15px;
    font-family: inherit;
    color: var(--onos-navy);
    transition: all 0.25s ease;
    box-sizing: border-box;
    font-weight: 500;
    cursor: pointer;
}

/* Enhanced Select Interactivity */
.onos-form-group select {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%231B1464' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 18px center !important;
    padding-right: 45px !important;
}

.onos-form-group input:focus,
.onos-form-group select:focus {
    outline: none;
    background: #fff;
    border-color: var(--onos-primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.08);
}

.onos-event-form.onos-attempted-submit input[type="text"]:invalid,
.onos-event-form.onos-attempted-submit input[type="email"]:invalid,
.onos-event-form.onos-attempted-submit input[type="tel"]:invalid,
.onos-event-form.onos-attempted-submit select:invalid {
    background: #fff5f5;
    box-shadow: inset 0 0 0 1px #dc2626, 0 0 0 3px rgba(220, 38, 38, 0.12);
}

.onos-event-form.onos-attempted-submit .onos-choice-item input[type="radio"]:invalid + .onos-card-inner,
.onos-event-form.onos-attempted-submit .onos-choice-item input[type="radio"]:invalid + .onos-method-inner {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

/* Modern Tab Selection (Image 2 Aesthetic) */
.onos-choice-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)) !important;
    gap: 12px !important;
    margin: 12px 0 !important;
}

.onos-choice-item {
    position: relative;
    cursor: pointer;
}

.onos-choice-item input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0; height: 0;
}

.onos-card-inner,
.onos-method-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 20px;
    background: #fff;
    border: 1.5px solid transparent; /* Consistent border for stable sizing */
    box-shadow: 0 4px 15px rgba(27, 20, 100, 0.04);
    border-radius: var(--onos-radius);
    color: var(--onos-navy);
    font-weight: 700;
    font-size: 14px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    height: 100%; /* Force fill container */
    box-sizing: border-box;
}

.onos-choice-item {
    position: relative;
    cursor: pointer;
    display: flex; /* Allow height stretching */
    flex-direction: column;
}

/* Active State - DARK NAVY matching Reference Image 2 */
.onos-choice-item.active .onos-card-inner,
.onos-choice-item.active .onos-method-inner {
    background: var(--onos-navy) !important;
    color: #ffffff !important;
    border-color: var(--onos-navy) !important;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.15) !important;
}

/* Indicators and Icons in active state */
.onos-choice-item.active .dashicons,
.onos-choice-item.active .onos-label-text {
    color: #ffffff !important;
}

.onos-radio-indicator {
    display: none; /* Hide old radio look for hyper-clean tab vibe */
}

/* Gender/Method Card Specifics */
.onos-card-inner .dashicons {
    margin-right: 8px;
    font-size: 18px;
    width: 18px;
    height: 18px;
    color: var(--onos-text-secondary);
}

/* Field Hint Fix */
.onos-field-hint {
    display: block !important;
    width: 100% !important;
    margin-top: 8px !important;
    font-size: 12px !important;
    line-height: 1.5 !important;
    color: var(--onos-text-secondary) !important;
    font-style: italic !important;
    clear: both !important;
}

/* Payment Section Styling */
.onos-payment-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--onos-border);
}

.onos-payment-section label {
    font-size: 14px;
    font-weight: 700;
    color: var(--onos-navy);
    margin-bottom: 16px;
    display: block;
}

/* PIN Group Refinement */
.onos-pin-group {
    background: #f8fafc;
    border: 2px dashed #e2e8f0;
    padding: 2.5rem;
    border-radius: var(--onos-radius);
    margin-top: 1.5rem;
    display: none; /* Hidden by default */
    text-align: center;
    animation: onosSlideDown 0.3s ease-out;
}

@keyframes onosSlideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.onos-pin-group input {
    text-align: center;
    font-size: 20px;
    letter-spacing: 4px;
    font-weight: 700;
    border-style: solid;
    max-width: 300px;
}

/* Fee Display */
.onos-registration-fee {
    background: var(--onos-bg);
    padding: 2rem;
    border-radius: var(--onos-radius);
    margin-top: 3rem;
    text-align: center;
    border: 1px solid var(--onos-border);
}

.onos-registration-fee p {
    margin: 0 0 10px 0;
    font-size: 13px;
    font-weight: 700;
    color: var(--onos-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.onos-registration-fee h3 {
    margin: 0;
    font-size: 38px;
    font-weight: 900;
    color: var(--onos-navy);
    letter-spacing: -0.04em;
}

/* Submit Button - Premium Hyper Clean */
.onos-form-submit {
    margin-top: 2.5rem;
}

.onos-submit-btn {
    width: 100%;
    height: 64px;
    background: var(--onos-primary);
    color: #fff;
    border: none;
    border-radius: var(--onos-radius);
    font-size: 17px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.2);
}

.onos-submit-btn:hover {
    background: var(--onos-navy);
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.25);
}

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

/* International Phone Input */
.iti { width: 100%; }
.iti__selected-flag { border-radius: var(--onos-radius) 0 0 var(--onos-radius); padding-left: 14px; }

/* Messages */
.onos-form-message {
    margin-top: 1.5rem;
    padding: 18px;
    border-radius: var(--onos-radius);
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    display: none;
}

.onos-form-message.success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #10b981;
}

.onos-form-message.onos-ticket-success {
    background: transparent;
    color: inherit;
    border: none;
    padding: 0;
    margin-top: 0;
    box-shadow: none;
}

.onos-form-message.error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

.onos-ticket-success-shell {
    text-align: left;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #ffffff;
    box-shadow: 0 26px 50px rgba(15, 23, 42, 0.12);
}

.onos-ticket-success-hero {
    padding: 28px 28px 24px;
    background: linear-gradient(135deg, #0f766e 0%, #0f172a 100%);
    color: #ffffff;
}

.onos-ticket-success-kicker {
    display: inline-block;
    margin-bottom: 12px;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: rgba(255, 255, 255, 0.78);
}

.onos-ticket-success-hero h2 {
    margin: 0;
    font-size: 30px;
    font-weight: 900;
    line-height: 1.05;
    color: #ffffff;
}

.onos-ticket-success-hero p {
    margin: 12px 0 0;
    font-size: 15px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.9);
}

.onos-ticket-success-body {
    padding: 24px;
}

.onos-ticket-success-copy {
    color: #334155;
    font-size: 15px;
    line-height: 1.75;
}

.onos-ticket-success-copy p:first-child {
    margin-top: 0;
}

.onos-ticket-success-copy p:last-child {
    margin-bottom: 0;
}

.onos-ticket-success-warning {
    color: #92400e;
}

.onos-ticket-success-actions,
.onos-ticket-success-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}

.onos-ticket-success-action,
.onos-ticket-success-linkchip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 18px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.onos-ticket-success-action:hover,
.onos-ticket-success-linkchip:hover {
    transform: translateY(-1px);
}

.onos-ticket-success-action-primary {
    background: #0f172a;
    color: #ffffff;
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.16);
}

.onos-ticket-success-action-secondary {
    background: #ffffff;
    color: var(--onos-navy);
    border: 1px solid rgba(27, 20, 100, 0.16);
}

.onos-ticket-success-linkchip {
    background: #eef2ff;
    color: var(--onos-navy);
}

.onos-ticket-success-preview {
    margin-top: 22px;
}

.onos-ticket-success-preview .onos-ticket-shell {
    box-shadow: none;
}

.onos-ticket-success-preview .onos-ticket-hero {
    padding: 20px 22px;
}

.onos-ticket-success-preview .onos-ticket-hero h1 {
    font-size: 24px;
}

.onos-ticket-success-preview .onos-ticket-hero p,
.onos-ticket-success-preview .onos-ticket-message,
.onos-ticket-success-preview .onos-ticket-links,
.onos-ticket-success-preview .onos-ticket-footer {
    display: none;
}

.onos-ticket-success-preview .onos-ticket-panel {
    padding: 18px 20px 20px;
}

.onos-ticket-success-preview .onos-ticket-banner {
    max-height: 190px;
    margin-bottom: 16px;
}

.onos-ticket-success-preview .onos-ticket-grid {
    gap: 12px;
    margin-bottom: 14px;
}

.onos-ticket-success-preview .onos-ticket-card {
    padding: 14px;
}

.onos-ticket-success-preview .onos-ticket-reference {
    padding: 14px 16px;
}

/* Responsive Polishing */
@media (max-width: 650px) {
    .onos-event-form-wrapper {
        padding: 2rem 1.2rem;
        margin: 1.5rem auto !important; /* Centered with auto */
        width: 100% !important;
        max-width: calc(100% - 2rem) !important; /* Safety margin for mobile */
        border-radius: 5px;
    }

    /* Force Gender and Payment tabs to be 2 per row on mobile if needed */
    .onos-choice-grid {
        grid-template-columns: 1fr 1fr !important;
    }
    
    .onos-registration-fee h3 { font-size: 30px; }
    .onos-event-title { font-size: 22px; }
    .onos-ticket-success-hero h2 { font-size: 24px; }
    .onos-ticket-success-body { padding: 18px; }
    .onos-ticket-success-actions,
    .onos-ticket-success-links {
        flex-direction: column;
    }
    .onos-ticket-success-action,
    .onos-ticket-success-linkchip {
        width: 100%;
    }
    .onos-ticket-success-preview .onos-ticket-panel {
        padding: 16px;
    }
    
    /* Font size bump to prevent iOS auto-zoom on focus */
    .onos-form-group input[type="text"],
    .onos-form-group input[type="email"],
    .onos-form-group input[type="tel"],
    .onos-form-group select {
        font-size: 16px !important;
    }

    /* Reduce horizontal padding on choice cards to 18px on mobile */
    .onos-card-inner,
    .onos-method-inner {
        padding: 14px 14px !important;
    }
}

/* Certificate Search - Hyper Clean */
.onos-cert-search-box {
    background: #fff;
    padding: 4rem 2.5rem;
    border-radius: 5px;
    box-shadow: var(--onos-shadow);
    border: 1px solid var(--onos-border);
    max-width: 850px;
    margin: 4rem auto;
    text-align: center;
}

.onos-cert-search-box h3 {
    margin: 0 0 12px 0;
    font-size: 28px;
    font-weight: 850;
    color: var(--onos-navy);
    letter-spacing: -0.04em;
}

.onos-cert-search-box p {
    color: var(--onos-text-secondary);
    font-size: 16px;
    margin-bottom: 2.5rem;
}

.onos-cert-flex-row {
    display: grid;
    grid-template-columns: 1.2fr 1.8fr;
    gap: 15px;
    margin-bottom: 20px;
}

.onos-cert-select,
#onos-cert-email {
    width: 100%;
    height: 54px;
    padding: 0 18px;
    background: var(--onos-input-bg);
    border: none;
    box-shadow: inset 0 2px 5px rgba(27, 20, 100, 0.05);
    border-radius: var(--onos-radius);
    font-size: 15px;
    font-family: inherit;
    color: var(--onos-navy);
    box-sizing: border-box;
    font-weight: 500;
}

.onos-cert-select {
    appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%231B1464' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 18px center !important;
    padding-right: 45px !important;
}

.onos-cert-btn {
    width: 100%;
    height: 60px;
    background: var(--onos-navy);
    color: #fff;
    border-radius: var(--onos-radius);
    font-weight: 800;
    font-size: 18px; /* Slightly larger for emphasis */
    border: none;
    cursor: pointer;
    transition: all 0.25s;
    text-transform: none; /* Reference 2 vibe */
}

.onos-cert-btn:hover {
    background: #000; /* Darker on hover */
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.2);
}

.onos-cert-action-row {
    margin-top: 25px;
}

.onos-cert-card {
    background: #fff;
    border: 1px solid var(--onos-border);
    border-radius: var(--onos-radius);
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 15px;
    transition: all 0.25s;
    text-align: left;
}

@media (max-width: 768px) {
    .onos-cert-flex-row {
        display: block !important;
    }
    .onos-cert-select,
    #onos-cert-email {
        display: block !important;
        width: 100% !important;
        margin-bottom: 12px !important;
    }
    .onos-cert-search-box {
        padding: 2.5rem 1rem !important;
        margin: 1.5rem 10px !important;
        width: calc(100% - 20px) !important;
        box-sizing: border-box !important;
    }
    .onos-cert-search-box h3 { font-size: 22px; }
    .onos-cert-btn { 
        height: 65px; 
        font-size: 18px; 
        display: flex !important;
        align-items: center;
        justify-content: center;
    }
    .onos-cert-card {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    .onos-download-link {
        width: 100%;
        text-align: center;
        box-sizing: border-box;
    }
}

.onos-download-link {
    background: #eff6ff;
    color: #2563eb;
    padding: 12px 22px;
    border-radius: 5px;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s;
}

.onos-download-link:hover {
    background: #dbeafe;
}
