﻿/* ==========================================================================
   1. GLOBAL & BASE STYLES
   ========================================================================== */
/*body {
    padding-top: 50px;
    padding-bottom: 20px;
}*/

#main {
    background-image: url("https://static.law.ac.uk/img/OpenPaymentPortalBackground.jpg");
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    min-height: 100vh;
    margin: 0;
}

/* Ensure the inner content div is transparent so the background shows through */
#content {
    background: transparent;
}

/* Set padding to keep content from hitting the edges */
.body-content {
    padding-left: 15px;
    padding-right: 15px;
}

/* Set width on the form input elements since they're 100% wide by default */
input,
select,
textarea {
    max-width: 280px;
}

/* Override bootstrap behavior for horizontal description lists */
.dl-horizontal dt {
    white-space: normal;
}

.text-highlight {
    color: #91278f;
}

.text-highlight-blue {
    color: #0084a9;
}

/* ==========================================================================
   2. TOOLTIP COMPONENT
   ========================================================================== */
.flywire-tooltip {
    position: relative;
    display: inline-block;
    cursor: pointer;
    font-size: 1.5rem;
    color: #91278f; /* ULaw Purple */
}

    .flywire-tooltip::after {
        content: attr(data-tooltip);
        position: absolute;
        bottom: 150%;
        left: 50%;
        transform: translateX(-50%);
        background: #91278f;
        color: #fff;
        padding: 8px 12px;
        border-radius: 4px;
        width: 250px;
        max-width: 90vw;
        white-space: normal;
        text-align: left;
        font-size: 1.0rem;
        line-height: 1.4;
        visibility: hidden;
        opacity: 0;
        transition: opacity 0.3s;
        pointer-events: none;
    }

    /* Small arrow at the bottom of the tooltip */
    .flywire-tooltip::before {
        content: "";
        position: absolute;
        bottom: 120%;
        left: 50%;
        margin-left: -5px;
        border-width: 5px;
        border-style: solid;
        border-color: #91278f transparent transparent transparent;
        visibility: hidden;
        opacity: 0;
        transition: opacity 0.3s;
    }

    /* Show on hover */
    .flywire-tooltip:hover::after,
    .flywire-tooltip:hover::before {
        visibility: visible;
        opacity: 1;
    }

/* ==========================================================================
   3. PAYMENT PANEL & FORM ELEMENTS
   ========================================================================== */
#payment-panel {
    padding: 40px 0;
}

    #payment-panel label {
        font-weight: 600;
        margin-bottom: 5px;
    }

    #payment-panel .form-group {
        margin-bottom: 18px;
    }

    #payment-panel input.form-control {
        border-radius: 6px;
        box-shadow: none;
        border: 1px solid #ddd;
        transition: border-color 0.2s ease, box-shadow 0.2s ease;
    }

        #payment-panel input.form-control:focus {
            border-color: #91278f;
            box-shadow: 0 0 0 2px rgba(145, 39, 143, 0.1);
        }

    #payment-panel .btn {
        border-radius: 6px;
    }

.icon-checked {
    display: none;
}

.icon-unchecked {
    display: inline-block;
    color: #ccc; /* Light Grey */
    margin-right: 8px;
    font-size: 1.2em;
    vertical-align: middle;
}

/* --- Checked States --- */

#AcceptedTermsAndConditions:checked ~ .icon-unchecked {
    display: none;
}

#AcceptedTermsAndConditions:checked ~ .icon-checked {
    display: inline-block;
    color: #91278f; /* ULaw Purple */
    margin-right: 8px;
    font-size: 1.2em;
    vertical-align: middle;
}

.payment-error-header i {
    margin-right: 12px;
}

/* ==========================================================================
   4. DETAILS PANEL & SUMMARY
   ========================================================================== */
#payment-details-panel {
    background: #fff;
    border: none;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    overflow: hidden; /* keeps rounded corners clean */
}

    #payment-details-panel .panel-heading {
        background: transparent;
        border-bottom: 1px solid #eee;
        padding: 20px 25px;
    }

        #payment-details-panel .panel-heading h1 {
            margin: 0;
            font-size: 22px;
            font-weight: 600;
        }

    #payment-details-panel .panel-body {
        padding: 25px;
    }

.summary-container p {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.summary-container .label {
    background: none;
    color: #666;
    font-weight: 500;
    padding: 0;
}

.summary-container .value {
    font-weight: 600;
}

/* ==========================================================================
   5. BUTTONS & ACTIONS
   ========================================================================== */
/* Combined styles for both proceed and payment buttons */
#cs-proceedButton,
#cs-paymentButton,
#domestic-paymentButton,
#Try-Another-Payment-button,
#Start-Another-Payment-button,
#cl-proceedButton,
#cl-paymentButton {
    background: #91278f;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 12px 20px;
    font-weight: 600;
    transition: all 0.2s ease;
}

    #cs-proceedButton i,
    #cs-paymentButton i,
    #cl-proceedButton i,
    #cl-paymentButton i {
        margin-right: 8px;
    }

    #cs-proceedButton:hover,
    #cs-paymentButton:hover,
    #domestic-paymentButton:hover,
    #Try-Another-Payment-button:hover,
    #Start-Another-Payment-button:hover,
    #cl-proceedButton:hover,
    #cl-paymentButton:hover {
        background: #7a1f78;
        transform: translateY(-1px);
    }

#edit-details-button:hover {
    transform: translateY(-1px);
}

#payment-actions-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    gap: 10px;
}

#payment-initiated-container {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    width: 100%;
}

#Ulaw-website-return-container {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    width: 100%;
    font-size: 18px
}

.return-container i,
.return-container a {
    color: #91278f; /* ULaw Blue */
    text-decoration: none;
    transition: color 0.2s ease;
}

.return-container:hover i,
.return-container:hover a {
    color: #005f7a; /* Darker ULaw Blue */
    text-decoration: underline; 
}

.return-container i {
    font-size: 1.1em; 
    min-width: 25px;
}

.return-container {
    position: relative; /* This is the anchor for the tooltip */
    cursor: pointer;
}

    .return-container::after {
        content: attr(data-tooltip);
        position: absolute;
        bottom: 125%; /* Positions it above the link */
        left: 50%;
        transform: translateX(-50%);
        background-color: #333; /* Dark gray for contrast */
        color: #fff;
        padding: 6px 10px;
        border-radius: 4px;
        font-size: 12px;
        white-space: nowrap;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease;
        z-index: 10;
    }

    .return-container::before {
        content: "";
        position: absolute;
        bottom: 110%;
        left: 50%;
        transform: translateX(-50%);
        border: 6px solid transparent;
        border-top-color: #333;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease;
        z-index: 10;
    }

    .return-container:hover::after,
    .return-container:hover::before {
        opacity: 1;
        visibility: visible;
    }

#payment-disclaimer {
    text-align: center; 
    margin-top: 25px; 
    margin-bottom: 20px; 
    color: #666; 
    font-size: 15px; 
    width: 100%; 
}

label.btn {
    text-align: left;
    white-space: normal;
    padding-left: 0;
}

/* ==========================================================================
   6. Container - Payment Not Complete
   ========================================================================== */

.card-container {
    display: grid;
    gap: 7px;
    grid-template-columns: 1fr; /* Stacked for mobile */
    padding: 15px;
    max-width: 1100px; /* Prevents it from stretching too far */
    margin: 0 auto; /* Centers the container horizontally */
}

@media (min-width: 768px) {
    .card-container {
        /* Left column is 1.5x wider than the right */
        grid-template-columns: 1.5fr 1fr;
    }
    .title-card {
        /* This tells the title card to start at column 1 and end at column 3 */
        /* (In a 2-column grid, there are 3 vertical lines) */
        grid-column: 1 / 3;
        /* Optional: Style it differently to stand out */
        background-color: #f8f9fa;
        text-align: left;
    }
}

.card {
    background: #fff;
    border: 1px solid #ddd;
    padding: 20px;
    border-radius: 8px;
}

    .card h3 {
        color: #91278f;
    }

/*Sub Card CSS*/

/* The container for the sub-cards to add spacing */
.sub-card-container {
    display: flex;
    flex-direction: column;
    gap: 7px; /* Space between the grey items */
    margin-top: 15px;
}

/* The individual light grey sub-cards */
.list-sub-card {
    background-color: #eeeeee; /* Light grey background */
    border-radius: 6px;
    padding: 12px 15px;
    display: flex;
    align-items: center; /* Vertically centers icon and text */
    transition: background-color 0.2s ease;
}

    /* Optional: subtle hover effect */
    .list-sub-card:hover {
        background-color: #ededed;
    }

    /* Styling the Font Awesome Icon */
    .list-sub-card i {
        color: #555; /* Icon color */
        margin-right: 12px; /* Gap between icon and text */
        font-size: 1.1em;
        width: 20px; /* Ensures icons align vertically even if widths vary */
        text-align: center;
    }

    /* The text inside the sub-card */
    .list-sub-card span {
        font-size: 0.95rem;
        color: #333;
    }

    .list-sub-card i.text-highlight {
        color: #91278f;
    }


/* ==========================================================================
   7. RESPONSIVE DESIGN (MEDIA QUERIES)
   ========================================================================== */
@media (max-width: 768px) {
    #payment-actions-container {
        flex-direction: column;
    }

    #domestic-paymentButton
    #cs-proceedButton,
    #cs-paymentButton,
    #Start-Another-Payment-button,
    #cl-proceedButton,
    #cl-paymentButton,
    #edit-details-button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    #cs-paymentButton,
    #cl-paymentButton {
        font-size: 0; /* hide original text */
    }

        #cs-paymentButton::after,
        #cl-paymentButton::after {
            content: "Pay Securely";
            font-size: 18px;
        }
}

@media (max-width: 356px) {
    #Start-Another-Payment-button {
        font-size: 0; /* hide original text */
    }

        #Start-Another-Payment-button::after {
            content: "Pay again";
            font-size: 18px;
        }
}

@media (max-width: 356px) {
    #Try-Another-Payment-button {
        font-size: 0; /* hide original text */
    }

        #Try-Another-Payment-button::after {
            content: "Try again";
            font-size: 18px;
        }
}

@media (max-width: 340px) {
    #cl-proceedButton,
    #cs-proceedButton {
        font-size: 0; /* hide original text */
    }

        #cl-proceedButton::after,
        #cs-proceedButton::after {
            content: "Proceed";
            font-size: 18px;
        }
}

@media (max-width: 600px) {
    #Ulaw-website-return-container {
        flex-direction: column;
        align-items: center;
        gap: 12px;
        margin-top: 25px;
    }

    
    .return-container:first-child {
        border-bottom: 1px solid #eee;
        padding-bottom: 12px;
        width: 80%; 
        justify-content: center;
    }
}
