/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: #fff;
    margin: auto;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    max-width: 500px;
    width: 90%;
    position: relative;
}

.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-button:hover,
.close-button:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}

/* Loading modal styles */
.loading-content {
    text-align: center;
    padding: 30px;
}

.loader {
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 2s linear infinite;
    margin: 0 auto 20px;
}

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

/* PIX modal styles */
.pix-content {
    text-align: center;
}

.pix-content h2 {
    margin-top: 0;
    color: #333;
}

.pix-amount {
    font-size: 24px;
    font-weight: bold;
    margin: 15px 0;
    color: #2ecc71;
}

.pix-qrcode-container {
    margin: 20px auto;
    background-color: #fff;
    padding: 15px;
    border-radius: 8px;
    display: inline-block;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
}

.payment-done-button {
    display: block;
    background-color: #2ecc71;
    color: white;
    text-align: center;
    padding: 12px 20px;
    border-radius: 5px;
    margin: 15px auto 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s;
    max-width: 200px;
}

.payment-done-button:hover {
    background-color: #27ae60;
}

.payment-status {
    width: 100%;
    text-align: center;
    margin: 15px 0;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 5px;
    font-size: 14px;
}

.payment-status p {
    margin: 0;
    color: #495057;
}

.pix-copy-container {
    margin: 20px 0;
}

.pix-copy-input-container {
    display: flex;
    margin-top: 10px;
}

#pix-copy-input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    font-size: 14px;
}

#pix-copy-button {
    padding: 10px 15px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-size: 14px;
}

#pix-copy-button:hover {
    background-color: #2980b9;
}

.pix-instructions {
    margin-top: 20px;
    text-align: left;
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
}

.pix-instructions p {
    margin: 8px 0;
    color: #555;
}

/* Error modal styles */
.error-content {
    text-align: center;
}

.error-content h2 {
    color: #e74c3c;
}

#error-close-button {
    margin-top: 20px;
    padding: 10px 20px;
    background-color: #e74c3c;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

#error-close-button:hover {
    background-color: #c0392b;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .modal-content {
        width: 95%;
        padding: 15px;
    }
    
    .pix-qrcode-container img {
        max-width: 100%;
        height: auto;
    }
}
