/* PalawanPay Remittance System - Global Styles */

/* CSS Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f0f8f0;
    min-height: 100vh;
    color: #2d5016;
    line-height: 1.5;
    margin: 0;
    padding: 0;
}

/* Container and Layout */
.container {
    max-width: 400px;
    margin: 0 auto;
    padding: 0 20px;
    /* 移除会造成底部空隙的最小高度，改为由内容自然撑开 */
    min-height: auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.card {
    background: white;
    border-radius: 0;
    padding: 24px 20px;
    box-shadow: none;
    margin: 0;
    border: none;
}

/* Header Styles */
.header {
    text-align: center;
    margin-bottom: 32px;
}

.logo-placeholder {
    width: 80px;
    height: 80px;
    background: #f0f0f0;
    border: 2px dashed #ccc;
    border-radius: 12px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #666;
    text-align: center;
}

.title {
    font-size: 22px;
    font-weight: 600;
    color: #2d5016;
    margin-bottom: 6px;
}

.subtitle {
    font-size: 14px;
    color: #5a7c47;
    font-weight: 400;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #2d5016;
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d4e6d4;
    border-radius: 6px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #ffffff;
    color: #2d5016;
}

.form-input:focus {
    outline: none;
    border-color: #28a745;
    background: white;
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.1);
}

.form-input::placeholder {
    color: #95a5a6;
}

/* Button Styles */
.btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: none;
    letter-spacing: 0;
}

.btn-primary {
    background: #28a745;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: #218838;
    transform: none;
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.2);
}

.btn-primary:disabled {
    background: #c6c6c6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
    transform: none;
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.2);
}

/* Info Display Styles */
.info-section {
    margin-bottom: 20px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e8f5e8;
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    font-size: 13px;
    color: #5a7c47;
    font-weight: 400;
}

.info-value {
    font-size: 15px;
    color: #2d5016;
    font-weight: 500;
    text-align: right;
}

.amount {
    font-size: 28px;
    font-weight: 600;
    color: #28a745;
    text-align: center;
    margin: 20px 0;
}

/* Alert Styles */
.alert {
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-info {
    background: #e3f2fd;
    color: #1976d2;
    border-left: 4px solid #2196f3;
}

/* Responsive Design */

/* Mobile Extra Small (280px) */
@media (max-width: 280px) {
    .container {
        padding: 12px;
    }
    
    .card {
        padding: 20px 12px;
    }
    
    .title {
        font-size: 18px;
    }
    
    .form-input, .btn {
        padding: 12px;
        font-size: 13px;
    }
    
    .footer {
        margin-top: 0;
        padding: 0;
    }
    
    .footer-container {
        padding: 0;
        gap: 0;
    }
    
    .footer-bottom {
        margin-top: 0;
        padding-top: 0;
        border-top: none;
    }
    
    .header-logo-img {
        height: 50px;
        max-width: 200px;
    }
    
    .footer-logo-img {
        height: 40px;
        max-width: 250px;
    }
}

/* Mobile Small (320px) */
@media (min-width: 281px) and (max-width: 320px) {
    .container {
        padding: 16px;
    }
    
    .card {
        padding: 24px 16px;
    }
    
    .title {
        font-size: 20px;
    }
    
    .form-input, .btn {
        padding: 14px;
        font-size: 14px;
    }
    
    .footer {
        margin-top: 0;
        padding: 0;
    }
    
    .footer-container {
        padding: 0;
        gap: 0;
    }
    
    .footer-bottom {
        margin-top: 0;
        padding-top: 0;
        border-top: none;
    }
    
    .header-logo-img {
        height: 55px;
        max-width: 220px;
    }
    
    .footer-logo-img {
        height: 45px;
        max-width: 280px;
    }
}

/* Mobile Medium (375px) */
@media (min-width: 321px) and (max-width: 375px) {
    .container {
        padding: 18px;
    }
    
    .footer {
        margin-top: 0;
        padding: 0;
    }
    
    .footer-container {
        padding: 0;
        gap: 0;
    }
    
    .footer-bottom {
        margin-top: 0;
        padding-top: 0;
        border-top: none;
    }
    
    .header-logo-img {
        height: 60px;
        max-width: 250px;
    }
    
    .footer-logo-img {
        height: 50px;
        max-width: 320px;
    }
}

/* Mobile Large (414px) */
@media (min-width: 376px) and (max-width: 414px) {
    .container {
        max-width: 380px;
    }
    
    .footer {
        margin-top: 0;
        padding: 0;
    }
    
    .footer-container {
        padding: 0;
        gap: 0;
    }
    
    .footer-bottom {
        margin-top: 0;
        padding-top: 0;
        border-top: none;
    }
    
    .header-logo-img {
        height: 65px;
        max-width: 280px;
    }
    
    .footer-logo-img {
        height: 55px;
        max-width: 350px;
    }
}

/* Tablet Portrait (768px) */
@media (min-width: 415px) and (max-width: 768px) {
    .container {
        max-width: 500px;
        padding: 40px;
    }
    
    .card {
        padding: 40px 32px;
    }
    
    .title {
        font-size: 28px;
    }
    
    .footer {
        margin-top: 0;
        padding: 0;
    }
    
    .footer-container {
        padding: 0;
        gap: 0;
    }
    
    .footer-bottom {
        margin-top: 0;
        padding-top: 0;
        border-top: none;
    }
    
    .header-logo-img {
        height: 70px;
        max-width: 320px;
    }
    
    .footer-logo-img {
        height: 60px;
        max-width: 400px;
    }
}

/* Tablet Landscape (1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        max-width: 600px;
    }
    
    .card {
        padding: 48px 40px;
    }
    
    .footer {
        margin-top: 0;
        padding: 0;
    }
    
    .footer-container {
        padding: 0;
        gap: 0;
    }
    
    .footer-bottom {
        margin-top: 0;
        padding-top: 0;
        border-top: none;
    }
    
    .header-logo-img {
        height: 75px;
        max-width: 350px;
    }
    
    .footer-logo-img {
        height: 65px;
        max-width: 450px;
    }
}

/* Desktop (1440px+) */
@media (min-width: 1025px) {
    .container {
        max-width: 500px;
    }
    
    .card {
        padding: 48px 40px;
    }
    
    .title {
        font-size: 30px;
    }
    
    .footer {
        margin-top: 0;
        padding: 0;
    }
    
    .footer-container {
        padding: 0;
        gap: 0;
    }
    
    .footer-bottom {
        margin-top: 0;
        padding-top: 0;
        border-top: none;
    }
    
    .header-logo-img {
        height: 80px;
        max-width: 400px;
    }
    
    .footer-logo-img {
        height: 70px;
        max-width: 500px;
    }
}

/* Galaxy Fold (280px folded) */
@media (max-width: 280px) and (orientation: portrait) {
    .container {
        padding: 8px;
    }
    
    .card {
        padding: 16px 8px;
    }
    
    .title {
        font-size: 16px;
        line-height: 1.3;
    }
    
    .subtitle {
        font-size: 12px;
    }
    
    .form-input, .btn {
        padding: 10px;
        font-size: 12px;
    }
    
    .header-logo-img {
        height: 40px;
        max-width: 180px;
    }
    
    .footer-logo-img {
        height: 30px;
        max-width: 200px;
    }
}

/* iPhone SE (375x667) */
@media (min-width: 375px) and (max-width: 375px) and (min-height: 667px) {
    .container {
        padding: 20px;
    }
    
    .card {
        padding: 32px 24px;
    }
    
    .header-logo-img {
        height: 60px;
        max-width: 250px;
    }
    
    .footer-logo-img {
        height: 50px;
        max-width: 320px;
    }
}

/* Large Desktop (1920px+) */
@media (min-width: 1920px) {
    .container {
        max-width: 600px;
    }
    
    .card {
        padding: 60px 50px;
    }
    
    .title {
        font-size: 32px;
    }
    
    .footer {
        margin-top: 0;
        padding: 0;
    }
    
    .footer-container {
        padding: 0;
        gap: 0;
    }
    
    .footer-bottom {
        margin-top: 0;
        padding-top: 0;
        border-top: none;
    }
    
    .header-logo-img {
        height: 90px;
        max-width: 450px;
    }
    
    .footer-logo-img {
        height: 80px;
        max-width: 550px;
    }
}

/* Landscape Orientation */
@media (orientation: landscape) and (max-height: 500px) {
    .container {
        justify-content: flex-start;
        padding-top: 20px;
        padding-bottom: 20px;
    }
    
    .card {
        margin-bottom: 10px;
    }
    
    .logo {
        margin-bottom: 20px;
    }
    
    .header-logo-img {
        height: 50px;
        width: auto;
        max-width: 250px;
        object-fit: contain;
        display: block;
        margin: 0 auto;
    }
    
    .footer-logo-img {
        height: 40px;
        width: auto;
        max-width: 300px;
        object-fit: contain;
        display: block;
        margin: 0 auto;
    }
    
    .logo-placeholder {
        width: 60px;
        height: 60px;
        margin-bottom: 12px;
    }
    
    .footer {
        margin-top: 0;
        padding: 0;
    }
    
    .footer-container {
        padding: 0;
        gap: 0;
    }
    
    .footer-bottom {
        margin-top: 0;
        padding-top: 0;
        border-top: none;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-up {
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(10px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for keyboard navigation */
.btn:focus,
.form-input:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .card {
        border: 2px solid #000;
    }
    
    .form-input {
        border-color: #000;
    }
}

/* Footer Styles */
.footer {
    background: #e8f5e8;
    padding: 20px;
    margin-top: 0 !important;
    border-top: none !important;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.footer-logos {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.footer-logo {
    height: 60px;
    width: auto;
    max-width: 480px;
    object-fit: contain;
}

.footer-contact {
    text-align: center;
    border-bottom: 2px solid #28a745;
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.contact-header {
    font-size: 16px;
    font-weight: bold;
    color: #28a745;
    margin-bottom: 8px;
}

.contact-email, .contact-phone {
    color: #28a745;
    font-size: 14px;
    margin: 4px 0;
}

.contact-email span, .contact-phone span {
    margin-right: 5px;
}

.footer-sections {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.footer-column {
    border-bottom: 1px solid #28a745;
    padding: 15px 0;
    position: relative;
}

.footer-column:last-child {
    border-bottom: none;
}

.footer-column h4 {
    color: #28a745;
    font-size: 16px;
    font-weight: bold;
    margin: 0;
    padding-right: 30px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-column h4::after {
    content: '▼';
    font-size: 12px;
    color: #28a745;
    transition: transform 0.3s ease;
}

.footer-column.collapsed h4::after {
    transform: rotate(-90deg);
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 10px 0 0 0;
    max-height: 200px;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.footer-column.collapsed ul {
    max-height: 0;
    margin: 0;
}

.footer-column li {
    margin: 8px 0;
}

.footer-column a {
    color: #666;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.footer-column a:hover {
    color: #28a745;
}

.footer-bottom {
    display: none;
}

/* Footer JavaScript functionality */
.footer-column h4:hover {
    background-color: rgba(40, 167, 69, 0.1);
    padding: 5px;
    margin: -5px;
    border-radius: 4px;
}

/* Logo responsive styles */
.logo {
    text-align: center;
    margin-bottom: 1.5rem;
}

.logo svg {
    max-width: 100%;
    height: auto;
}

/* Responsive Image Styles */
.header-logo-img, .footer-logo-img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

/* Print styles */
@media print {
    body {
        background: white;
    }
    
    .container {
        max-width: none;
        margin: 0;
        padding: 0;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .footer {
        display: none;
    }
}