/* Ahs Digital Product - Transaction Single Page Styles (Modern Dark Design) */

/* Base & Reset */
:root {
    --bg-dark: #0a0a0a;
    --card-dark: #1a1a1a;
    --border-dark: #2a2a2a;
    --accent-color: #00d4aa;
    --accent-hover: #00e5bb;
    --text-main: #ffffff;
    --text-muted: #888888;
    --text-content: #cccccc;
    --danger: #ff5555;
    --warning: #ffd700;
}

body {
    background-color: var(--bg-dark) !important;
    color: var(--text-main);
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', 'Roboto', sans-serif;
    margin: 0;
}

.ahs-dp-container {
    max-width: 650px !important;
    width: 100%;
    margin: 60px auto 60px auto;
    padding: 40px;
    box-sizing: border-box;
    background-color: var(--card-dark);
    border: 1px solid var(--border-dark);
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: fadeInUp 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
    position: relative;
    overflow: hidden;
}

/* Subtle accent line on top */
.ahs-dp-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-color), var(--accent-color-end, #4dd4ac));
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header */
.ahs-dp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.ahs-dp-logo {
    max-height: 45px;
    width: auto;
    object-fit: contain;
}

.ahs-dp-invoice {
    text-align: right;
}

.ahs-dp-invoice h3 {
    color: var(--accent-color);
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    letter-spacing: 0.5px;
}

.ahs-dp-invoice p {
    font-size: 13px;
    color: var(--text-muted);
    margin: 5px 0 0 0;
}

.ahs-dp-divider {
    height: 1px;
    background: var(--border-dark);
    margin: 24px 0;
    border: none;
}

.ahs-dp-message {
    margin-bottom: 24px;
    color: var(--text-content);
    line-height: 1.6;
    text-align: center;
    font-size: 15px;
}

/* Table Styling */
.ahs-dp-table {
    margin-bottom: 24px;
    background: #111; /* Slightly darker inner container */
    border-radius: 8px;
    padding: 20px;
    border: 1px solid var(--border-dark);
}

.ahs-dp-row {
    display: flex;
    padding: 12px 14px; /* Added slight horizontal padding for border effect */
    border-bottom: 1px solid var(--border-dark);
    align-items: center;
    transition: all 0.2s ease;
    border-radius: 4px; /* slightly clearer radius */
    margin-bottom: 2px;
    border-left: 3px solid transparent; /* Prepare for hover accent */
}

.ahs-dp-row:last-child {
    border-bottom: none;
}

.ahs-dp-row:hover {
    background: #232323; /* Distinct hover bg */
    border-left-color: var(--accent-color); /* Premium interaction */
    transform: translateX(2px); /* Subtle feedback */
}

.ahs-dp-label {
    width: 40%;
    font-weight: 500;
    font-size: 14px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
}

/* Remove the bullet point, replace with better styling if needed, keeping simple for now */
.ahs-dp-label::before {
    content: none;
}

.ahs-dp-value {
    width: 60%;
    color: var(--text-main);
    font-size: 15px;
    font-weight: 600;
    text-align: right;
    word-break: break-word;
}

/* Button Section */
.ahs-dp-button-section {
    margin-top: 32px;
    text-align: center;
}

.ahs-dp-button-section p {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 16px;
}

.ahs-dp-button {
    width: 100%;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    color: var(--accent-text, #0a0a0a); /* Dark text on bright button */
    background: var(--accent-color);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: block;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 212, 170, 0.2);
    margin-bottom: 15px;
}

.ahs-dp-button:hover {
    background: var(--accent-hover);
    color:rgba(0, 0, 0, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 212, 170, 0.3);
}

.ahs-dp-button:active {
    transform: translateY(0);
}

/* Icon */
.sand-icon {
    font-size: 48px;
    color: var(--warning);
    margin-bottom: 24px;
    text-align: center;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(1); opacity: 0.8; }
}

/* Footer Section */
.ahs-dp-footer {
    text-align: center;
    margin-top: 30px;
    color: var(--text-muted);
    font-size: 14px;
}

.ahs-dp-footer a {
    display: inline-block;
    background-color: rgb(10, 117, 82); /* Keep original green or adapt */
    background-color: #2a2a2a !important; /* Overriding inline style with important for theme consistency */
    color: var(--accent-color) !important;
    border: 1px solid var(--border-dark) !important;
    padding: 10px 20px !important;
    border-radius: 8px !important;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
    margin-top: 10px;
}

.ahs-dp-footer a:hover {
    border-color: var(--accent-color) !important;
    transform: translateY(-2px);
}

/* Modal Information */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.2s ease;
}

.modal-overlay.active {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-box {
    background: var(--card-dark);
    border: 1px solid var(--border-dark);
    width: 90%;
    max-width: 420px;
    padding: 32px 28px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    animation: slideUp 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.modal-box h2 {
    color: var(--text-main);
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 12px 0;
    letter-spacing: 0.3px;
}

.modal-box p {
    color: var(--text-content);
    font-size: 15px;
    line-height: 1.6;
    margin: 0 0 24px 0;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.modal-actions button {
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-main);
    background: var(--border-dark);
    border: 1px solid var(--border-dark);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', 'Roboto', sans-serif;
}

.modal-actions button:hover {
    background: #333333;
    border-color: var(--accent-color);
    transform: translateY(-1px);
}

/* Responsive */
@media (max-width: 600px) {
    .ahs-dp-container {
        margin-top: 20px;
        margin-bottom: 20px;
        margin-left: 10px;
        margin-right: 10px;
        padding: 28px 20px;
        width: 95% !important;
    }

    .ahs-dp-header {
        flex-direction: column;
        gap: 15px;
        align-items: center;
        text-align: center;
    }

    .ahs-dp-invoice {
        text-align: center;
    }

    .ahs-dp-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        padding: 12px 14px; /* Fix: Maintain consistent horizontal padding */
    }

    .ahs-dp-label,
    .ahs-dp-value {
        width: 100%;
        text-align: left;
    }
    
    .ahs-dp-value {
        padding-left: 0;
        color: var(--text-main);
    }
}

/* Force dark mode overrides regardless of system preference if desired, 
   or handle mostly via the root variables as defined above. */
@media (prefers-color-scheme: dark) {
    /* Already handled by default root vars */
}