/* ============================================================
   COLLNET 2026 Payment System - Custom CSS
   Uva Wellassa University of Sri Lanka
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=DM+Sans:wght@300;400;500;600&display=swap');

/* Root Variables */
:root {
    --primary:        #1a3353;
    --primary-mid:    #1e4d7b;
    --accent:         #c8962a;
    --accent-light:   #e8b84b;
    --success:        #0f7c5a;
    --error:          #b91c1c;
    --warning:        #b45309;
    --text-dark:      #111827;
    --text-mid:       #374151;
    --text-muted:     #6b7280;
    --bg-white:       #ffffff;
    --bg-soft:        #f5f7fa;
    --bg-cream:       #faf8f4;
    --border:         #dde1e8;
    --border-focus:   #1e4d7b;
    --shadow-sm:      0 1px 3px rgba(0,0,0,0.08);
    --shadow-md:      0 4px 12px rgba(26,51,83,0.12);
    --shadow-lg:      0 12px 32px rgba(26,51,83,0.16);
    --radius:         10px;
    --radius-lg:      16px;
    --transition:     all 0.25s ease;
}

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    line-height: 1.65;
    color: var(--text-dark);
    background: var(--bg-soft);
    min-height: 100vh;
}

/* ---- Layout ---- */
.main-container {
    max-width: 760px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* ---- Header ---- */
header {
    background: var(--primary);
    padding: 0;
    box-shadow: var(--shadow-md);
}

.header-banner {
    width: 100%;
    height: auto;
    display: block;
}

/* ---- Conference Badge ---- */
.conf-badge {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-mid) 60%, #2a6199 100%);
    color: white;
    text-align: center;
    padding: 1.5rem 1.25rem 1.25rem;
    border-bottom: 3px solid var(--accent);
}

.conf-badge .conf-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: white;
    line-height: 1.2;
}

.conf-badge .conf-sub {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.75);
    margin-top: 0.3rem;
    font-weight: 400;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.conf-badge .conf-dates {
    display: inline-block;
    margin-top: 0.6rem;
    background: rgba(200,150,42,0.25);
    border: 1px solid rgba(200,150,42,0.5);
    color: var(--accent-light);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.25rem 0.85rem;
    border-radius: 20px;
    letter-spacing: 0.05em;
}

/* ---- Payment Card ---- */
.payment-form {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 2.5rem 2.25rem;
    margin: 2rem 0;
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.payment-form::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
}

/* ---- Section Titles ---- */
.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
    margin-left: 0.5rem;
}

/* ---- Fee Summary ---- */
.fee-summary {
    background: var(--bg-cream);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    margin-bottom: 2rem;
}

.fee-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0;
    border-bottom: 1px dashed var(--border);
    font-size: 0.93rem;
}

.fee-row:last-child {
    border-bottom: none;
    padding-top: 0.75rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--primary);
}

.fee-label { color: var(--text-mid); }
.fee-amount { font-weight: 600; color: var(--primary); }
.fee-row:last-child .fee-amount { color: var(--accent); font-size: 1.15rem; }

/* ---- Category Pill ---- */
.category-pill {
    display: inline-block;
    background: var(--primary);
    color: white;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.3rem 0.9rem;
    border-radius: 20px;
    margin-bottom: 1.25rem;
    letter-spacing: 0.04em;
}

/* ---- Form Controls ---- */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.83rem;
    font-weight: 600;
    color: var(--text-mid);
    margin-bottom: 0.4rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.form-control {
    width: 100%;
    padding: 0.78rem 1rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.95rem;
    color: var(--text-dark);
    background: var(--bg-white);
    transition: var(--transition);
    appearance: none;
}

.form-control:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(30,77,123,0.1);
}

.form-control::placeholder { color: #9ca3af; }
.form-control.error { border-color: var(--error); }
.form-control.valid { border-color: var(--success); }

select.form-control {
    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='%236b7280' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
    cursor: pointer;
}

/* ---- Radio Group ---- */
.radio-group {
    background: var(--bg-soft);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.25rem;
}

.radio-option {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.7rem 0.85rem;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 0.4rem;
}

.radio-option:last-child { margin-bottom: 0; }

.radio-option:hover { background: rgba(30,77,123,0.06); }

.radio-option input[type="radio"] {
    width: 17px; height: 17px;
    accent-color: var(--primary);
    cursor: pointer;
    flex-shrink: 0;
    margin-top: 2px;
}

.radio-label {
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--text-dark);
    cursor: pointer;
    line-height: 1.4;
}

.radio-label small {
    display: block;
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 400;
    margin-top: 0.15rem;
}

/* ---- Author Fields (collapsible) ---- */
.author-fields {
    background: rgba(200,150,42,0.06);
    border: 1.5px solid rgba(200,150,42,0.25);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.25rem;
    display: none;
}

.author-fields.visible {
    display: block;
    animation: slideDown 0.3s ease;
}

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

.author-fields .author-note {
    font-size: 0.8rem;
    color: var(--warning);
    background: rgba(180,83,9,0.08);
    border-left: 3px solid var(--accent);
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    font-weight: 500;
}

/* ---- Submit Button ---- */
.btn-pay {
    display: block;
    width: 100%;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-mid) 100%);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-family: 'DM Sans', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
    margin-top: 0.5rem;
}

.btn-pay:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: linear-gradient(135deg, #1e4d7b 0%, #2a6199 100%);
}

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

.btn-pay:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

.btn-pay .pay-main { font-size: 1.05rem; }
.btn-pay .pay-sub  { font-size: 0.78rem; opacity: 0.85; margin-top: 0.1rem; }

/* ---- Trust Badges ---- */
.trust-strip {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1.25rem;
    flex-wrap: wrap;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* ---- Divider ---- */
.form-divider {
    height: 1px;
    background: var(--border);
    margin: 1.75rem 0;
}

/* ---- Receipt ---- */
.receipt-wrap {
    max-width: 640px;
    margin: 2rem auto;
}

.receipt-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    border: 1px solid var(--border);
}

.receipt-hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-mid) 70%, #2a6199 100%);
    color: white;
    padding: 2rem 2.5rem;
    text-align: center;
    border-bottom: 3px solid var(--accent);
}

.receipt-hero .status-icon { font-size: 2.5rem; margin-bottom: 0.5rem; }
.receipt-hero h1 { font-family: 'Playfair Display', serif; font-size: 1.65rem; margin-bottom: 0.35rem; }
.receipt-hero p  { font-size: 0.9rem; opacity: 0.85; }

.receipt-body { padding: 2rem 2.5rem; }

.receipt-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1.75rem;
}

.meta-block {
    background: var(--bg-soft);
    border-radius: 8px;
    padding: 0.85rem 1rem;
    border: 1px solid var(--border);
}

.meta-block .meta-label {
    font-size: 0.73rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.2rem;
}

.meta-block .meta-value {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-dark);
    word-break: break-all;
}

.receipt-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
    font-size: 0.92rem;
}

.receipt-table th {
    background: var(--primary);
    color: white;
    padding: 0.7rem 1rem;
    text-align: left;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.receipt-table td {
    padding: 0.8rem 1rem;
    border-bottom: 1px solid var(--border);
}

.receipt-table tr:last-child td {
    border-bottom: none;
    background: var(--bg-cream);
    font-weight: 700;
    font-size: 1rem;
    color: var(--primary);
}

.receipt-table .text-right { text-align: right; }
.receipt-table .total-amount { color: var(--accent); font-size: 1.1rem; }

.receipt-notice {
    background: rgba(15,124,90,0.07);
    border: 1px solid rgba(15,124,90,0.2);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    text-align: center;
    font-size: 0.85rem;
    color: var(--success);
    margin-bottom: 1.25rem;
}

.receipt-footer-note {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    line-height: 1.7;
}

/* ---- Print Button ---- */
.print-btn {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    background: var(--accent);
    color: white;
    border: none;
    padding: 0.65rem 1.25rem;
    border-radius: var(--radius);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    z-index: 999;
}

.print-btn:hover { background: #b07d1a; transform: translateY(-1px); }

/* ---- Error / Cancel / Timeout Pages ---- */
.status-page {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.25rem;
}

.status-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 3rem 2.5rem;
    text-align: center;
    max-width: 480px;
    width: 100%;
    border: 1px solid var(--border);
}

.status-card .status-icon-lg { font-size: 3.5rem; margin-bottom: 1rem; }

.status-card h1 {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    color: var(--primary);
    margin-bottom: 0.75rem;
}

.status-card.error-card h1 { color: var(--error); }
.status-card.timeout-card h1 { color: var(--warning); }

.status-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 2rem;
    line-height: 1.7;
}

/* ---- Buttons (generic) ---- */
.btn {
    display: inline-block;
    padding: 0.75rem 1.75rem;
    border-radius: var(--radius);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.92rem;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    border: none;
    transition: var(--transition);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-mid));
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover { background: #0a6449; transform: translateY(-1px); }

.btn-outline {
    background: transparent;
    border: 2px solid var(--border-focus);
    color: var(--primary);
}

.btn-outline:hover { background: var(--primary); color: white; }

/* ---- Footer ---- */
footer {
    margin-top: 3rem;
    background: var(--primary);
    box-shadow: var(--shadow-md);
}

.footer-banner {
    width: 100%;
    height: auto;
    display: block;
}

.footer-info {
    color: rgba(255,255,255,0.65);
    text-align: center;
    padding: 1rem;
    font-size: 0.78rem;
}

/* ---- Loading Animation ---- */
.cls_loding {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    border-radius: var(--radius);
}

/* ---- Alerts ---- */
.alert {
    padding: 0.9rem 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 1.25rem;
    border-left: 4px solid;
    font-size: 0.9rem;
}

.alert-success { background: #ecfdf5; border-color: var(--success); color: #065f46; }
.alert-error   { background: #fef2f2; border-color: var(--error);   color: #991b1b; }
.alert-warning { background: #fffbeb; border-color: var(--accent);  color: #78350f; }
.alert-info    { background: #eff6ff; border-color: var(--primary); color: #1e40af; }

/* ---- Responsive ---- */
@media (max-width: 600px) {
    .payment-form { padding: 1.5rem 1.25rem; }
    .receipt-body { padding: 1.5rem 1.25rem; }
    .receipt-hero { padding: 1.5rem 1.25rem; }
    .receipt-meta { grid-template-columns: 1fr; }
    .status-card  { padding: 2rem 1.5rem; }
    .print-btn    { position: static; width: 100%; margin-bottom: 1rem; }
    .trust-strip  { flex-direction: column; align-items: center; gap: 0.75rem; }
}

/* ---- Print ---- */
@media print {
    header, footer, .print-btn, .trust-strip { display: none !important; }
    body { background: white !important; }
    .receipt-card { box-shadow: none !important; border: 1px solid #ddd; }
    .receipt-wrap { margin: 0; }
}

/* ---- Animations ---- */
.fade-in {
    animation: fadeIn 0.45s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ================================================================
   Fee Selector (Step 1) — added for COLLNET 2026 self-contained flow
================================================================ */

/* ---- Tier Banners ---- */
.tier-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
    padding: 0.9rem 1.25rem;
    border-radius: var(--radius);
    font-size: 0.88rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.earlybird-banner {
    background: linear-gradient(135deg, #1a3353 0%, #1e4d7b 100%);
    color: white;
    border: 1px solid rgba(200,150,42,0.4);
}

.normal-banner {
    background: linear-gradient(135deg, #065f46 0%, #059669 100%);
    color: white;
    border: 1px solid rgba(255,255,255,0.15);
}

.tier-tag {
    font-weight: 700;
    font-size: 0.92rem;
    letter-spacing: 0.02em;
}

.tier-info { opacity: 0.9; }

.tier-urgent {
    color: #fde68a;
    font-weight: 700;
}

/* ---- Fee Selector Table ---- */
.fee-selector-table {
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.fee-selector-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.1rem 1.4rem;
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: var(--transition);
}

.fee-selector-row:last-child { border-bottom: none; }

.fee-selector-row:hover,
.fee-selector-row.hovered {
    background: #f0f6ff;
    text-decoration: none;
    color: inherit;
}

.fee-selector-row.premium-row { background: var(--bg-cream); }
.fee-selector-row.premium-row:hover { background: #fdf6e8; }

.fsr-left { flex: 1; min-width: 0; }

.fsr-country {
    font-weight: 700;
    font-size: 0.97rem;
    color: var(--primary);
    margin-bottom: 0.2rem;
}

.fsr-pkg {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 0.3rem;
}

.regular-pkg { color: var(--primary-mid); }
.premium-pkg  { color: var(--accent); }

.fsr-includes {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.fsr-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
    flex-shrink: 0;
}

.fsr-amount {
    font-family: 'Playfair Display', serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--primary);
    white-space: nowrap;
}

.btn-select {
    display: inline-block;
    background: var(--primary);
    color: white;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.35rem 0.9rem;
    border-radius: 20px;
    white-space: nowrap;
    transition: var(--transition);
    letter-spacing: 0.03em;
    border: none;
    cursor: pointer;
}

.fee-selector-row:hover .btn-select { background: var(--accent); }

.fsr-divider {
    height: 6px;
    background: var(--bg-soft);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

/* ---- Back link (step 2) ---- */
.back-link {
    display: inline-block;
    font-size: 0.83rem;
    font-weight: 600;
    color: var(--primary-mid);
    text-decoration: none;
    margin-bottom: 1.25rem;
    transition: var(--transition);
    letter-spacing: 0.01em;
}

.back-link:hover { color: var(--accent); text-decoration: none; }

/* ---- Required asterisk ---- */
.req { color: var(--error); font-size: 0.85em; }

/* ---- Responsive adjustments ---- */
@media (max-width: 520px) {
    .fee-selector-row { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
    .fsr-right { flex-direction: row; align-items: center; width: 100%; justify-content: space-between; }
    .fsr-amount { font-size: 1.15rem; }
    .tier-banner { flex-direction: column; align-items: flex-start; }
}
