/* TDAC Card Registration Styles */

:root {
    --primary: #2596be;
    --secondary: #fd9909;
    --dark: #1a1a1a;
    --light: #f8f9fa;
    --gray: #6c757d;
    --border: #e9ecef;
    --success: #28a745;
    --danger: #dc3545;
}

.tdac-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.tdac-header {
    text-align: center;
    margin-bottom: 3rem;
}

.tdac-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
}

.tdac-header p {
    color: var(--gray);
    font-size: 1.1rem;
}

.tdac-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 2rem;
}

/* Form Section */
.tdac-form-section .form-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    border: 1px solid var(--border);
}

.form-card-header {
    background: linear-gradient(135deg, var(--primary), #1e7a9e);
    color: white;
    padding: 1.5rem 2rem;
}

.form-card-header h2 {
    font-size: 1.5rem;
    margin-bottom: 0.3rem;
}

.form-card-header p {
    opacity: 0.9;
    font-size: 0.9rem;
}

form {
    padding: 2rem;
}

.form-group-section {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.form-group-section h3 {
    font-size: 1.2rem;
    color: var(--dark);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
    margin-bottom: 1.2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 0.4rem;
    color: var(--dark);
}

.form-group input,
.form-group textarea {
    padding: 0.8rem 1rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 150, 190, 0.1);
}

/* Travellers Section */
.travellers-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.btn-add-traveller {
    background: linear-gradient(135deg, var(--primary), #1e7a9e);
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.btn-add-traveller:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(37, 150, 190, 0.3);
}

.travellers-note {
    font-size: 0.85rem;
    color: var(--gray);
    margin-bottom: 1rem;
}

.traveller-card {
    background: var(--light);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.traveller-card:hover {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.traveller-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.2rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px dashed var(--border);
}

.traveller-header h4 {
    font-size: 1rem;
    color: var(--primary);
    font-weight: 600;
}

.btn-remove-traveller {
    background: none;
    border: none;
    color: var(--danger);
    cursor: pointer;
    font-size: 0.8rem;
    padding: 0.3rem 0.8rem;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.btn-remove-traveller:hover {
    background: rgba(220, 53, 69, 0.1);
}

/* Price Summary */
.price-summary {
    background: linear-gradient(135deg, rgba(37, 150, 190, 0.05), rgba(253, 153, 9, 0.05));
    border-radius: 15px;
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.price-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    font-size: 1rem;
}

.price-row.total {
    border-top: 2px solid var(--border);
    margin-top: 0.5rem;
    padding-top: 1rem;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
}

/* Submit Button */
.btn-submit {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--secondary), #ff7f00);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1.5rem;
}

.btn-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(253, 153, 9, 0.4);
}

.btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Info Section */
.tdac-info-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.info-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    border: 1px solid var(--border);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.info-card h3 {
    font-size: 1.1rem;
    color: var(--primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--secondary);
    display: inline-block;
}

.info-list {
    list-style: none;
    padding: 0;
}

.info-list li {
    padding: 0.6rem 0;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--gray);
    font-size: 0.9rem;
}

.info-list li i {
    width: 24px;
    color: var(--secondary);
    font-size: 1rem;
}

/* Alert Box */
.tdac-alert {
    display: none;
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    font-weight: 500;
}

.tdac-alert.error {
    background: linear-gradient(135deg, #dc3545, #c82333);
}

.tdac-alert.show {
    display: block;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .tdac-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .tdac-container {
        padding: 1rem;
    }

    .tdac-header h1 {
        font-size: 1.8rem;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    form {
        padding: 1.5rem;
    }

    .traveller-card {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .travellers-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
    }

    .price-row {
        font-size: 0.9rem;
    }

    .btn-submit {
        font-size: 1rem;
        padding: 0.8rem;
    }
}

/* Payment Loading Overlay */
.payment-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.payment-loading-container {
    text-align: center;
    background: white;
    padding: 2rem 3rem;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    animation: fadeInScale 0.3s ease-out;
}

.payment-loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(37, 150, 190, 0.2);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    margin: 0 auto 1rem;
    animation: spin 1s linear infinite;
}

.payment-loading-text {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.payment-loading-subtext {
    font-size: 0.85rem;
    color: var(--gray);
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* TDAC Card Registration Styles */

:root {
    --primary: #2596be;
    --secondary: #fd9909;
    --dark: #1a1a1a;
    --light: #f8f9fa;
    --gray: #6c757d;
    --border: #e9ecef;
    --success: #28a745;
    --danger: #dc3545;
}

.tdac-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.tdac-header {
    text-align: center;
    margin-bottom: 3rem;
}

.tdac-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
}

.tdac-header p {
    color: var(--gray);
    font-size: 1.1rem;
}

.tdac-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 2rem;
}

/* Form Section */
.tdac-form-section .form-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    border: 1px solid var(--border);
}

.form-card-header {
    background: linear-gradient(135deg, var(--primary), #1e7a9e);
    color: white;
    padding: 1.5rem 2rem;
}

.form-card-header h2 {
    font-size: 1.5rem;
    margin-bottom: 0.3rem;
}

.form-card-header p {
    opacity: 0.9;
    font-size: 0.9rem;
}

form {
    padding: 2rem;
}

.form-group-section {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.form-group-section h3 {
    font-size: 1.2rem;
    color: var(--dark);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
    margin-bottom: 1.2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 0.4rem;
    color: var(--dark);
}

.form-group input,
.form-group textarea {
    padding: 0.8rem 1rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 150, 190, 0.1);
}

/* Travellers Section */
.travellers-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.btn-add-traveller {
    background: linear-gradient(135deg, var(--primary), #1e7a9e);
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.btn-add-traveller:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(37, 150, 190, 0.3);
}

.travellers-note {
    font-size: 0.85rem;
    color: var(--gray);
    margin-bottom: 1rem;
}

.traveller-card {
    background: var(--light);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.traveller-card:hover {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.traveller-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.2rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px dashed var(--border);
}

.traveller-header h4 {
    font-size: 1rem;
    color: var(--primary);
    font-weight: 600;
}

.btn-remove-traveller {
    background: none;
    border: none;
    color: var(--danger);
    cursor: pointer;
    font-size: 0.8rem;
    padding: 0.3rem 0.8rem;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.btn-remove-traveller:hover {
    background: rgba(220, 53, 69, 0.1);
}

/* Price Summary */
.price-summary {
    background: linear-gradient(135deg, rgba(37, 150, 190, 0.05), rgba(253, 153, 9, 0.05));
    border-radius: 15px;
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.price-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    font-size: 1rem;
}

.price-row.total {
    border-top: 2px solid var(--border);
    margin-top: 0.5rem;
    padding-top: 1rem;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
}

/* Submit Button */
.btn-submit {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--secondary), #ff7f00);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1.5rem;
}

.btn-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(253, 153, 9, 0.4);
}

.btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Info Section */
.tdac-info-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.info-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    border: 1px solid var(--border);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.info-card h3 {
    font-size: 1.1rem;
    color: var(--primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--secondary);
    display: inline-block;
}

.info-list {
    list-style: none;
    padding: 0;
}

.info-list li {
    padding: 0.6rem 0;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--gray);
    font-size: 0.9rem;
}

.info-list li i {
    width: 24px;
    color: var(--secondary);
    font-size: 1rem;
}

/* Alert Box */
.tdac-alert {
    display: none;
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    font-weight: 500;
}

.tdac-alert.error {
    background: linear-gradient(135deg, #dc3545, #c82333);
}

.tdac-alert.show {
    display: block;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .tdac-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .tdac-container {
        padding: 1rem;
    }

    .tdac-header h1 {
        font-size: 1.8rem;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    form {
        padding: 1.5rem;
    }

    .traveller-card {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .travellers-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
    }

    .price-row {
        font-size: 0.9rem;
    }

    .btn-submit {
        font-size: 1rem;
        padding: 0.8rem;
    }
}

/* Payment Loading Overlay */
.payment-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.payment-loading-container {
    text-align: center;
    background: white;
    padding: 2rem 3rem;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    animation: fadeInScale 0.3s ease-out;
}

.payment-loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(37, 150, 190, 0.2);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    margin: 0 auto 1rem;
    animation: spin 1s linear infinite;
}

.payment-loading-text {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.payment-loading-subtext {
    font-size: 0.85rem;
    color: var(--gray);
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Ensure global box-sizing and prevent horizontal overflow */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    overflow-x: hidden;
    max-width: 100%;
}

.tdac-container {
    overflow-x: hidden;
    padding: 1.5rem;
}

/* For screens up to 768px */
@media (max-width: 768px) {
    .tdac-container {
        padding: 1rem;
    }

    .tdac-header h1 {
        font-size: 1.5rem;
    }

    .form-card {
        border-radius: 16px;
    }

    form {
        padding: 1.2rem;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .form-group input,
    .form-group textarea {
        width: 100%;
        max-width: 100%;
        font-size: 16px;
        /* Prevents zoom on iOS */
    }

    .traveller-card {
        padding: 1rem;
    }

    .traveller-header {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .price-summary {
        padding: 1rem;
    }

    .price-row {
        font-size: 0.9rem;
        flex-wrap: wrap;
    }

    .btn-submit {
        font-size: 1rem;
        padding: 0.8rem;
    }

    /* Ensure info cards don't cause overflow */
    .tdac-info-section {
        gap: 1rem;
    }

    .info-card {
        padding: 1rem;
    }

    .info-list li {
        font-size: 0.85rem;
        word-break: break-word;
    }
}

/* Extra small devices (phones, 480px and down) */
@media (max-width: 480px) {
    .tdac-container {
        padding: 0.75rem;
    }

    .form-card-header {
        padding: 1rem;
    }

    .form-card-header h2 {
        font-size: 1.3rem;
    }

    form {
        padding: 1rem;
    }

    .travellers-header {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-add-traveller {
        width: 100%;
        text-align: center;
    }

    .traveller-card {
        padding: 0.8rem;
    }

    .price-summary {
        padding: 0.8rem;
    }

    .price-row.total {
        font-size: 1rem;
    }
}