/**
 * CliManage Checkout Breakdown - Styles
 * 
 * @package CliManageCheckoutBreakdown
 * @since 1.0.0
 */

html, body {
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
}

.climanage-checkout-body {
    margin: 0 !important;
    padding: 0 !important;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    background: var(--background-color, #ffffff);
    color: var(--color, #333333);
    overflow-y: auto;
    width: 100% !important;
    max-width: 100% !important;
}

.climanage-checkout-body .site-content,
.climanage-checkout-body .content-area,
.climanage-checkout-body .main-content,
.climanage-checkout-body .entry-content {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

.climanage-checkout-container {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding: 40px 20px !important;
    min-height: 100vh;
    box-sizing: border-box;
    max-width: 1475px !important;
}

@media (min-width: 1200px) {
    .climanage-checkout-container {
        padding: 50px 40px !important;
    }
}

.climanage-checkout-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--cliM-border-color, #e0e0e0);
}

.climanage-checkout-header h1 {
    margin: 0 0 10px 0;
    font-size: 28px;
    color: var(--color, #2c3e50);
}

.climanage-checkout-header .project-name {
    margin: 0;
    font-size: 16px;
    color: var(--sub-color, #7f8c8d);
}

.climanage-checkout-breakdown {
    margin-bottom: 30px;
    width: 100%;
}

.breakdown-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
    width: 100%;
    max-width: 100%;
}

.breakdown-left,
.breakdown-right {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
}

.breakdown-section {
    margin-bottom: 20px;
    padding: 30px;
    background: var(--background-color, #fafafa);
    border-radius: 6px;
    border: 1px solid var(--cliM-border-color, #e0e0e0);
    flex: 1;
    width: 100%;
    box-sizing: border-box;
}

.breakdown-section.entries-section {
    margin-bottom: 20px;
}

.breakdown-section h2 {
    margin: 0 0 15px 0;
    font-size: 18px;
    color: var(--accent-color, #A8B78F);
    font-weight: 600;
}

.breakdown-section.final-amounts {
    background: var(--background-color, #ffffff);
    border: 1px solid var(--cliM-border-color, #e0e0e0);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.grand-total-box {
    padding: 25px 20px;
    background: var(--hover-background, #ffffff);
    border-radius: 8px;
    margin-top: 20px;
}

.grand-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.grand-total-label {
    font-size: 18px;
    color: var(--color, #2c3e50);
    font-weight: 600;
}

.grand-total-amount {
    font-size: 28px;
    font-weight: 700;
    color: var(--accent-color, #A8B78F);
}

.grand-total-subtitle {
    font-size: 14px;
    color: var(--sub-color, #7f8c8d);
    text-align: left;
    margin-top: 5px;
}

.breakdown-table {
    width: 100%;
    border-collapse: collapse;
}

.breakdown-table tr {
    border-bottom: 1px solid var(--cliM-border-color, #e0e0e0);
}

.breakdown-table tr:last-child {
    border-bottom: none;
}

.breakdown-table td {
    padding: 12px 0;
    font-size: 15px;
}

.breakdown-table td:first-child {
    color: var(--sub-color, #555555);
}

.breakdown-table td.amount {
    text-align: right;
    font-weight: 500;
    color: var(--color, #2c3e50);
}

.breakdown-table tr.total-row td {
    padding-top: 15px;
    border-top: 2px solid var(--cliM-border-color, #e0e0e0);
    font-size: 16px;
}

.breakdown-table tr.total-row td:first-child {
    color: var(--color, #2c3e50);
}

.breakdown-table tr.agency-row td {
    color: var(--accent-color, #1976d2);
    font-size: 16px;
}

.breakdown-table tr.climanage-row td {
    color: var(--completed-color, #388e3c);
    font-size: 16px;
}

/* Entries table styles */
.entries-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

/* Removed thead styles since we're not using headers anymore */

.entries-table tbody tr {
    border-bottom: 1px solid var(--cliM-border-color, #e8e8e8);
}

.entries-table tbody tr:last-child {
    border-bottom: none;
}

.entries-table td {
    padding: 15px 0;
    font-size: 15px;
    vertical-align: top;
}

.entries-table .entry-name {
    font-weight: 500;
    color: var(--color, #2c3e50);
    margin-bottom: 4px;
}

.entries-table .entry-type {
    font-size: 13px;
    color: var(--sub-color, #7f8c8d);
    margin-top: 2px;
    font-weight: normal;
    font-style: normal;
}

.entries-table td.amount {
    text-align: right;
    font-weight: 500;
    color: var(--color, #2c3e50);
}

.entries-table tfoot {
    border-top: 2px solid var(--cliM-border-color, #e0e0e0);
    margin-top: 10px;
}

.entries-table tfoot .subtotal-row td {
    padding-top: 15px;
    padding-bottom: 10px;
    font-size: 16px;
}

.entries-table tfoot .subtotal-row td:first-child {
    color: var(--color, #2c3e50);
    font-weight: 600;
}

.entries-table tfoot .subtotal-row td.amount {
    color: var(--color, #2c3e50);
    font-weight: 600;
}

/* Removed grand-total-row styles as we're using grand-total-box instead */

.climanage-checkout-actions {
    text-align: center;
    padding-top: 20px;
    border-top: 2px solid var(--cliM-border-color, #e0e0e0);
}

.btn-continue-payment {
    display: inline-block;
    padding: 15px 40px;
    background: var(--accent-color, #A8B78F);
    color: var(--active-color, #2c3e50);
    border: 1px solid var(--cliM-border-color, #e0e0e0);
    border-radius: 6px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    margin-right: 15px;
}

.btn-continue-payment:hover {
    background: var(--accent-color, #A8B78F);
    color: var(--active-color, #2c3e50);
    border: 1px solid var(--cliM-border-color, #e0e0e0);
}

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

.btn-continue-payment:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.btn-cancel {
    display: inline-block;
    padding: 15px 30px;
    background: var(--hover-background, #ffffff);
    color: var(--color, #2c3e50);
    border: 1px solid var(--cliM-border-color, #e0e0e0);
    border-radius: 6px;
    font-size: 16px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-cancel:hover {
    background: var(--hover-background, #ffffff);
    border-color: var(--cliM-border-color, #e0e0e0);
    color: var(--color, #2c3e50);
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    color: #fff;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

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

.loading-overlay p {
    margin: 0;
    font-size: 18px;
}

/* Responsive Design */
@media (max-width: 968px) {
    .breakdown-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .climanage-checkout-container {
        margin: 0;
        padding: 20px;
    }
    
    .climanage-checkout-header h1 {
        font-size: 24px;
    }
    
    .breakdown-section {
        padding: 20px;
    }
    
    .breakdown-layout {
        gap: 20px;
    }
    
    .breakdown-table td {
        font-size: 14px;
        padding: 10px 0;
    }
    
    .grand-total-box {
        padding: 20px 15px;
    }
    
    .grand-total-label {
        font-size: 14px;
        margin-bottom: 10px;
    }
    
    .grand-total-amount {
        font-size: 24px;
    }
    
    .btn-continue-payment {
        padding: 12px 30px;
        font-size: 16px;
        display: block;
        width: 100%;
        margin-bottom: 15px;
        margin-right: 0;
    }
    
    .btn-cancel {
        padding: 12px 30px;
        display: block;
        width: 100%;
    }
}

