/* RoomsCo Payment - Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f4f4f4;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 500px;
    margin: 20px auto;
    padding: 30px;
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.logo {
    width: 120px;
}

.language-selector {
    display: flex;
    gap: 5px;
}

.lang-btn {
    padding: 5px 12px;
    border: 1px solid #ddd;
    background: #fff;
    cursor: pointer;
    border-radius: 4px;
    font-size: 0.85em;
    transition: all 0.2s;
}

.lang-btn:hover {
    background: #f0f0f0;
}

.lang-btn.active {
    background: #ef6f22;
    color: #fff;
    border-color: #ef6f22;
}

/* Headings */
h2 {
    color: #2a313c;
    margin-bottom: 25px;
    font-weight: 500;
}

/* Form */
form {
    margin-top: 20px;
}

label {
    display: block;
    margin-bottom: 6px;
    color: #555;
    font-size: 0.95em;
}

input[type="email"],
input[type="text"] {
    width: 100%;
    padding: 12px;
    margin-bottom: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1em;
    transition: border-color 0.2s;
}

input:focus {
    outline: none;
    border-color: #ef6f22;
}

/* Amount input */
.amount-container {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 5px;
}

.currency-symbol,
.decimal-separator {
    font-size: 1.4em;
    font-weight: bold;
    color: #333;
}

.amount-input {
    width: 100px;
    text-align: right;
    font-size: 1.2em !important;
}

.cents-input {
    width: 60px;
    text-align: left;
    font-size: 1.2em !important;
}

/* Error messages */
.error-message {
    color: #dc3545;
    font-size: 0.85em;
    margin-bottom: 15px;
    display: none;
}

.error-banner {
    background: #f8d7da;
    color: #721c24;
    padding: 12px;
    border-radius: 4px;
    margin-top: 15px;
    text-align: center;
}

/* Terms */
.terms-container {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 20px 0;
}

.terms-checkbox {
    width: 18px;
    height: 18px;
    margin-top: 2px;
}

.terms-label {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 0;
}

.terms-label a {
    color: #ef6f22;
}

/* Button */
button[type="submit"],
.button {
    display: inline-block;
    width: 100%;
    padding: 15px;
    background-color: #ef6f22;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 1.1em;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: background-color 0.2s;
}

button[type="submit"]:hover,
.button:hover {
    background-color: #d85f17;
}

.button.secondary {
    background-color: #6c757d;
    margin-top: 10px;
}

.button.secondary:hover {
    background-color: #5a6268;
}

/* Card logos */
.card-logos {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.card-logos img {
    height: 35px;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.card-logos img:hover {
    opacity: 1;
}

/* Loading overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #ef6f22;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading-message {
    text-align: center;
    padding: 40px;
}

.loading-message .spinner {
    margin: 0 auto 20px;
}

/* Result page */
.result-box {
    text-align: center;
    padding: 30px;
    border-radius: 8px;
    margin: 20px 0;
}

.result-box.success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
}

.result-box.failed {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
}

.result-box.error {
    background: #fff3cd;
    border: 1px solid #ffeeba;
}

.result-icon {
    font-size: 3em;
    margin-bottom: 15px;
}

.result-box.success .result-icon {
    color: #28a745;
}

.result-box.failed .result-icon {
    color: #dc3545;
}

.result-box.error .result-icon {
    color: #856404;
}

.result-details {
    margin-top: 20px;
    text-align: left;
    display: inline-block;
}

.result-details p {
    margin: 5px 0;
}

.result-actions {
    margin-top: 25px;
}

.result-actions .button {
    width: auto;
    padding: 12px 25px;
    margin: 5px;
}

/* Responsive */
@media (max-width: 600px) {
    .container {
        margin: 10px;
        padding: 20px;
    }

    .header {
        flex-direction: column;
        gap: 15px;
    }

    .amount-input {
        width: 80px;
    }
}

/* Print styles */
@media print {
    .header,
    .result-actions,
    .language-selector {
        display: none !important;
    }

    .container {
        box-shadow: none;
        margin: 0;
    }
}
