/* 
 * Payment System Stylesheet
 * Pure CSS - No Bootstrap
 */

/* ==============================================================================
   CSS Variables
   ============================================================================== */
:root {
    --primary: #667eea;
    --primary-dark: #5568d3;
    --secondary: #764ba2;
    --success: #0f9d58;
    --danger: #dc3545;
    --warning: #ff9800;
    
    --text-primary: #333;
    --text-secondary: #6c757d;
    --text-muted: #888;
    
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --card-bg: #ffffff;
    --input-bg: #f8f9fa;
    --border-color: #e0e0e0;
    
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.3);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    
    --transition: all 0.3s ease;
}

/* ==============================================================================
   Reset & Base Styles
   ============================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--bg-gradient);
    min-height: 100vh;
    padding: 20px;
    line-height: 1.6;
    color: var(--text-primary);
}

/* ==============================================================================
   Container & Layout
   ============================================================================== */
.container {
    max-width: 800px;
    margin: 0 auto;
}

/* ==============================================================================
   Main Card
   ============================================================================== */
.main-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 40px;
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==============================================================================
   Logo Section
   ============================================================================== */
.logo-section {
    text-align: center;
    margin-bottom: 24px;
}

.logo {
    max-width: 100px;
    height: auto;
    transition: var(--transition);
}

.logo:hover {
    transform: scale(1.05);
}

/* ==============================================================================
   Header
   ============================================================================== */
.header {
    text-align: center;
    margin-bottom: 24px;
}

.title {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--bg-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
    animation: fadeInDown 0.8s ease-out;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.title .icon {
    -webkit-text-fill-color: initial;
    margin-right: 8px;
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

/* ==============================================================================
   Divider
   ============================================================================== */
.divider {
    border: none;
    border-top: 2px solid var(--border-color);
    margin: 20px 0;
}

/* ==============================================================================
   Navigation Buttons
   ============================================================================== */
.nav-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.btn-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 16px;
    background: var(--bg-gradient);
    color: white;
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 14px;
    text-align: center;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-nav:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.btn-nav .icon {
    flex-shrink: 0;
}

/* ==============================================================================
   Buttons
   ============================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
}

.btn-primary {
    background: var(--bg-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    color: white;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.6);
}

.btn-large {
    padding: 16px 32px;
    font-size: 20px;
    min-height: 56px;
}

/* ==============================================================================
   Forms
   ============================================================================== */
.payment-section form {
    background: var(--input-bg);
    padding: 30px;
    border-radius: var(--radius-md);
    border: 2px solid var(--border-color);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-primary);
}

.form-input {
    width: 100%;
    max-width: 300px;
    padding: 14px 16px;
    font-size: 18px;
    border: 2px solid #ddd;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    font-family: inherit;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-with-suffix {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 300px;
}

.input-with-suffix .form-input {
    flex: 1;
    max-width: none;
}

.suffix {
    color: var(--text-secondary);
    font-weight: 500;
}

.button-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 100%;
}

.button-group .btn {
    width: 100%;
}

/* ==============================================================================
   Warning & Error Boxes
   ============================================================================== */
.warning-box {
    background: #fff3cd;
    border-left: 4px solid var(--warning);
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.5;
    color: #856404;
}

.error-box {
    background: #f8d7da;
    border-left: 4px solid var(--danger);
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 20px;
    color: #721c24;
}

/* ==============================================================================
   Payment Card
   ============================================================================== */
.payment-card {
    max-width: 500px;
    margin: 0 auto;
}

.payment-notice {
    margin-bottom: 20px;
}

.warning-text {
    display: block;
    color: var(--danger);
    padding: 15px;
    background: #fff3cd;
    border-left: 4px solid var(--danger);
    border-radius: 4px;
    margin-bottom: 10px;
}

.payment-info {
    background: var(--input-bg);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 20px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px dashed var(--border-color);
}

.info-row:last-child {
    border-bottom: none;
}

.info-row .label {
    color: var(--text-secondary);
}

.info-row .value {
    font-weight: 600;
}

.info-row .value.highlight {
    color: var(--primary);
    font-size: 1.2em;
}

.loading-text {
    text-align: center;
    padding: 30px;
    color: var(--text-secondary);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ==============================================================================
   Text Content
   ============================================================================== */
.text-content {
    font-size: 16px;
    line-height: 1.8;
    color: #444;
}

.text-content p {
    margin-bottom: 16px;
}

.text-content a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.text-content a:hover {
    color: var(--secondary);
    text-decoration: underline;
}

.company-info {
    color: var(--text-secondary);
}

.notice {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.notice a {
    color: var(--primary);
}

/* ==============================================================================
   Lists
   ============================================================================== */
.numbered-list,
.feature-list {
    margin: 16px 0;
    padding-left: 30px;
}

.numbered-list li,
.feature-list li {
    margin: 10px 0;
    line-height: 1.6;
}

/* ==============================================================================
   Tables
   ============================================================================== */
.info-table {
    margin: 20px 0;
}

.info-table h3 {
    margin-bottom: 16px;
    color: var(--text-primary);
}

.info-table table {
    width: 100%;
    border-collapse: collapse;
    background: var(--input-bg);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.info-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: top;
}

.info-table tr:last-child td {
    border-bottom: none;
}

.info-table td:first-child {
    width: 200px;
    color: var(--text-secondary);
}

/* ==============================================================================
   Section Titles
   ============================================================================== */
.section-title {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary);
}

/* ==============================================================================
   Footer
   ============================================================================== */
.footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
}

.footer-logo {
    max-width: 200px;
    margin-bottom: 10px;
}

.footer small {
    color: var(--text-secondary);
}

/* ==============================================================================
   Error Page
   ============================================================================== */
.error-page {
    text-align: center;
    padding: 40px;
}

.error-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.error-title {
    font-size: 1.8rem;
    color: var(--danger);
    margin-bottom: 16px;
}

.error-message {
    color: var(--text-secondary);
    margin-bottom: 24px;
    font-size: 1.1rem;
}

/* ==============================================================================
   Test Mode Badge
   ============================================================================== */
.test-mode-badge {
    position: fixed;
    top: 10px;
    right: 10px;
    background: var(--warning);
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    z-index: 9999;
    font-weight: bold;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    font-size: 14px;
}

.test-mode-badge a {
    color: white;
    text-decoration: underline;
    margin-left: 10px;
}

/* ==============================================================================
   Responsive Design
   ============================================================================== */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .main-card {
        padding: 20px;
        border-radius: var(--radius-md);
    }
    
    .title {
        font-size: 1.8rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .nav-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .btn-nav {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .payment-section form {
        padding: 20px;
    }
    
    .form-input {
        max-width: none;
        font-size: 16px;
    }
    
    .input-with-suffix {
        max-width: none;
    }
    
    .btn-large {
        padding: 14px 24px;
        font-size: 16px;
    }
    
    .info-table td:first-child {
        width: 120px;
    }
}

@media (max-width: 480px) {
    .nav-buttons {
        grid-template-columns: 1fr;
    }
    
    .title {
        font-size: 1.5rem;
    }
    
    .btn-nav {
        justify-content: flex-start;
        padding: 12px 16px;
    }
    
    .info-table table {
        font-size: 14px;
    }
    
    .info-table td {
        display: block;
        padding: 8px 12px;
    }
    
    .info-table td:first-child {
        width: 100%;
        font-weight: 600;
        padding-bottom: 4px;
        border-bottom: none;
    }
    
    .info-table td:last-child {
        padding-top: 0;
    }
}

/* ==============================================================================
   Print Styles
   ============================================================================== */
@media print {
    body {
        background: white;
        padding: 0;
    }
    
    .main-card {
        box-shadow: none;
    }
    
    .test-mode-badge,
    .nav-buttons,
    .btn {
        display: none;
    }
}
