/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    max-width: 100%;
}

/* Prevent horizontal scroll */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    overflow-x: hidden !important;
    width: 100%;
    max-width: 100%;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
    overflow-x: hidden !important;
    width: 100%;
    max-width: 100vw;
    position: relative;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background-color: white;
    min-height: 100vh;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    position: relative;
    width: 100%;
    overflow-x: hidden !important;
    overflow-y: auto;
}

.container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #74ACDF 33%, white 33%, white 66%, #74ACDF 66%);
}

/* Header styles */
.header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
    background-color: white;
    border-bottom: 3px solid #1e4a72;
    text-align: center;
}

.coat-of-arms {
    margin-bottom: 20px;
}

.emblem-img {
    width: 100px;
    height: auto;
    max-height: 120px;
    object-fit: contain;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.3));
}

.header-text h1 {
    font-size: 24px;
    font-weight: bold;
    color: #1e4a72;
    margin-bottom: 5px;
    text-align: center;
}

.header-text h2 {
    font-size: 18px;
    color: #1e4a72;
    font-weight: normal;
    text-align: center;
}

/* Main content */
.main-content {
    padding: 40px 30px;
}

.main-title {
    font-size: 32px;
    color: #1e4a72;
    text-align: center;
    margin-bottom: 15px;
    font-weight: bold;
}

.service-description {
    text-align: center;
    margin-bottom: 25px;
    font-size: 16px;
    line-height: 1.8;
}

.service-description strong {
    color: #1e4a72;
    font-weight: bold;
}

/* Payment details */
.payment-details, .bank-details {
    margin-bottom: 30px;
}



/* Bank details specific styles */
.bank-details {
    overflow: visible;
    height: auto;
}

/* Transfer info container */
.transfer-info-container {
    margin: 25px 0 20px 0;
    padding: 0;
    overflow: visible;
}

.transfer-header {
    text-align: center;
    margin-bottom: 0;
    padding: 15px;
    background: linear-gradient(135deg, #1e4a72 0%, #2a5a82 100%);
    border-radius: 12px 12px 0 0;
    color: white;
}

.transfer-header h3 {
    margin: 0 0 8px 0;
    font-size: 20px;
    font-weight: bold;
}

.transfer-subtitle {
    font-size: 14px;
    opacity: 0.9;
    font-weight: normal;
}

/* Highlighted card for bank details */
.highlighted-card {
    background: linear-gradient(135deg, #f8f9ff 0%, #e8f2ff 100%);
    border: 3px solid #1e4a72;
    border-radius: 0 0 12px 12px;
    padding: 25px;
    box-shadow: 0 8px 25px rgba(30, 74, 114, 0.15);
    position: relative;
    margin-bottom: 0;
    overflow: visible;
    height: auto;
}

.highlighted-card::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: linear-gradient(45deg, #1e4a72, #74ACDF, #1e4a72);
    border-radius: 12px;
    z-index: -1;
    animation: borderGlow 3s ease-in-out infinite;
}

@keyframes borderGlow {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

.highlighted-card .detail-row {
    padding: 15px 20px;
    border-bottom: 2px solid rgba(30, 74, 114, 0.1);
    background: rgba(255, 255, 255, 0.7);
    margin: 8px 0;
    border-radius: 8px;
    overflow: visible;
    height: auto;
    min-height: auto;
}

.highlighted-card .detail-row:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.highlighted-card .label {
    font-weight: bold;
    color: #1e4a72;
    font-size: 15px;
}

.highlighted-card .value {
    font-weight: bold;
    color: #333;
    font-size: 16px;
}

/* Specific styles for bank-details with highlighted-card */
.bank-details.highlighted-card {
    overflow: visible;
    height: auto;
}



.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e0e0e0;
}

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

.label {
    font-weight: normal;
    color: #555;
    flex: 1;
}

.value {
    font-weight: bold;
    color: #333;
    text-align: right;
    flex: 1;
}

.value-with-copy {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex: 1;
    overflow: visible;
    height: auto;
    min-height: 40px;
}

.value-with-copy .value {
    flex: 1;
    word-break: break-all;
    line-height: 1.4;
}

.copy-icon-btn {
    background: rgba(116, 172, 223, 0.1);
    border: 2px solid #74ACDF;
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #74ACDF;
    flex-shrink: 0;
    margin-left: 10px;
}

.copy-icon-btn.modern-copy {
    background: rgba(116, 172, 223, 0.1);
    border: 2px solid #74ACDF;
    border-radius: 8px;
}

.copy-icon-btn:hover {
    background: #74ACDF;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(116, 172, 223, 0.3);
}

.copy-icon-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(116, 172, 223, 0.2);
}

.copy-icon-btn.copied {
    background: #28a745;
    border-color: #28a745;
    color: white;
    animation: copySuccess 0.3s ease;
}

.copy-icon-btn svg {
    transition: all 0.3s ease;
    width: 16px;
    height: 16px;
    stroke-width: 2;
    fill: none;
    display: block;
}

@keyframes copySuccess {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.amount {
    color: #1e4a72;
    font-size: 18px;
    font-weight: bold;
}

.amount-container {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 15px;
    flex: 1;
}



.security-badge-large {
    width: 350px;
    max-width: 85vw;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(4px 4px 15px rgba(0, 0, 0, 0.4));
    transition: transform 0.3s ease;
    animation: securityPulse 3s ease-in-out infinite;
}

.security-badge-large:hover {
    transform: scale(1.05);
    animation-play-state: paused;
}



@keyframes securityPulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.02);
    }
}

/* Bottom section */
.bottom-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 35px 0 20px 0;
    padding: 0;
}

.security-and-seal-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 60px;
    margin: 0;
}

.security-item {
    display: flex;
    justify-content: center;
    align-items: center;
}



.alias-copy {
    flex: 1;
    text-align: center;
    margin: 0 20px;
}

.alias-text {
    display: block;
    font-size: 18px;
    margin-bottom: 10px;
    color: #333;
}

.copy-btn {
    background-color: #e0e0e0;
    border: 1px solid #ccc;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.copy-btn:hover {
    background-color: #d0d0d0;
}

.send-btn {
    background: linear-gradient(135deg, #1e4a72 0%, #2a5a82 100%);
    border: 2px solid #1e4a72;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 3px 6px rgba(30, 74, 114, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.send-btn:hover {
    background: linear-gradient(135deg, #2a5a82 0%, #1e4a72 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 12px rgba(30, 74, 114, 0.4);
}

.send-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(30, 74, 114, 0.3);
}

.send-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.send-btn:hover::before {
    left: 100%;
}

/* Manager button styles */
.manager-btn-link {
    text-decoration: none;
    display: block;
    width: 100%;
}

.manager-btn {
    width: 100% !important;
    padding: 20px 30px !important;
    font-size: 20px !important;
    font-weight: bold !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    border-radius: 12px !important;
    box-shadow: 0 6px 20px rgba(30, 74, 114, 0.4) !important;
    transition: all 0.3s ease !important;
}

.manager-btn:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 8px 25px rgba(30, 74, 114, 0.5) !important;
}

/* Manager section styles */
.manager-section {
    margin: 15px 0;
    text-align: center;
    padding: 10px;
}

.manager-text {
    display: block;
    font-size: 18px;
    font-weight: bold;
    color: #1e4a72;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.manager-subtitle {
    display: block;
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    line-height: 1.4;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.official-seal {
    flex: 0 0 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bank-stamp {
    width: 120px;
    height: auto;
    max-height: 120px;
    object-fit: contain;
}

/* Action button */
.advisor-btn {
    width: 100%;
    background-color: #1e4a72;
    color: white;
    border: none;
    padding: 15px 20px;
    font-size: 18px;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 30px;
    transition: background-color 0.3s;
}

.advisor-btn:hover {
    background-color: #2a5a82;
}

/* Responsive design */
@media (max-width: 768px) {
    html, body {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100vw !important;
    }

    .container {
        margin: 0;
        box-shadow: none;
        width: 100% !important;
        max-width: 100vw !important;
        overflow-x: hidden !important;
        padding: 0;
    }
    
    .header {
        padding: 20px 15px;
    }

    .coat-of-arms {
        margin-bottom: 15px;
    }
    
    .emblem-img {
        width: 80px;
        max-height: 100px;
    }
    
    .main-content {
        padding: 20px 10px;
        width: 100% !important;
        max-width: 100vw !important;
        box-sizing: border-box;
        overflow-x: hidden !important;
    }
    
    .main-title {
        font-size: 20px;
        line-height: 1.2;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        margin-bottom: 10px;
    }

    .service-description {
        margin-bottom: 15px;
    }
    
    .qr-section {
        flex-direction: column;
        text-align: center;
    }

    .bottom-section {
        flex-direction: column;
        text-align: center;
        padding: 0;
        margin: 40px 0 15px 0;
    }

    .security-and-seal-row {
        display: flex;
        justify-content: flex-start;
        align-items: center;
        width: 100%;
        position: relative;
        padding: 0;
    }

    .security-item {
        display: flex;
        justify-content: flex-start;
        margin: 0;
    }

    .official-seal {
        position: absolute !important;
        right: 0 !important;
        display: flex !important;
        justify-content: flex-end !important;
    }

    .alias-copy {
        margin: 20px 0;
    }
    
    .detail-row {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }

    .value {
        text-align: left;
        margin-top: 5px;
    }

    .value-with-copy {
        justify-content: space-between;
        width: 100%;
        margin-top: 5px;
    }

    .copy-icon-btn {
        min-width: 36px;
        height: 36px;
        padding: 8px;
        margin-left: 8px;
    }

    .copy-icon-btn svg {
        width: 14px;
        height: 14px;
    }

    .value-with-copy {
        gap: 8px;
        min-height: 36px;
    }

    .transfer-header h3 {
        font-size: 18px;
    }

    .transfer-subtitle {
        font-size: 12px;
    }

    .highlighted-card {
        padding: 20px 15px;
        width: 100%;
        box-sizing: border-box;
        overflow: visible;
        height: auto;
    }

    .bank-details.highlighted-card {
        overflow: visible !important;
        height: auto !important;
        max-height: none !important;
    }

    .highlighted-card .detail-row {
        padding: 12px 15px;
        margin: 6px 0;
        overflow: visible;
        height: auto;
    }

    .highlighted-card .label {
        font-size: 14px;
    }

    .highlighted-card .value {
        font-size: 15px;
    }

    .amount-container {
        justify-content: space-between;
        flex-direction: row;
        align-items: center;
        gap: 8px;
        flex-wrap: nowrap;
    }



    .security-badge-large {
        width: 250px !important;
        max-width: 80vw !important;
        margin-left: 10px !important;
    }

    .bank-stamp {
        width: 100px;
        max-height: 100px;
        margin-right: 8px !important;
    }

    .send-btn {
        padding: 8px 16px;
        font-size: 12px;
        border-radius: 6px;
    }



    .manager-btn {
        padding: 15px 20px !important;
        font-size: 16px !important;
    }

    .manager-section {
        margin: 2px 0;
        padding: 0;
    }

    .transfer-info-container {
        margin: 15px 0 12px 0 !important;
    }

    .manager-text {
        font-size: 16px;
        margin-bottom: 8px;
        margin-top: 17px;
    }

    .manager-subtitle {
        font-size: 13px;
        margin-bottom: 12px;
        max-width: 300px;
    }

    /* Force all elements to stay within viewport */
    * {
        max-width: 100vw !important;
    }

    .detail-row, .value-with-copy, .amount-container, .transfer-info-container, .highlighted-card {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    .main-title {
        font-size: 18px !important;
        padding: 0 5px;
    }
}

/* Very small screens */
@media (max-width: 360px) {
    .main-title {
        font-size: 16px !important;
        letter-spacing: -0.5px;
    }
}
