/* PHP Integration Styles for Photo Booth Designer */

/* Footer updates */
.footer-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.secondary-button {
    background-color: #95a5a6;
    color: white;
    font-weight: bold;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    cursor: pointer;
}

.secondary-button:hover {
    background-color: #7f8c8d;
}

/* Modal dialogs */
.modal-dialog {
    position: fixed;
    z-index: 1000;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    width: 400px;
    max-width: 90%;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}

.modal-header h3 {
    margin: 0;
    color: #2c3e50;
}

.close-modal {
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    color: #7f8c8d;
}

.close-modal:hover {
    color: #2c3e50;
}

.modal-body {
    padding: 20px;
}

.modal-body label {
    display: block;
    margin-bottom: 10px;
    font-weight: bold;
    color: #2c3e50;
}

.modal-body input[type="text"] {
    width: 100%;
    padding: 10px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.modal-body .buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

/* Modal backdrop */
#modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

/* Template listing */
#template-list {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 15px;
    border: 1px solid #eee;
    border-radius: 4px;
    padding: 5px;
}

.template-item {
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background-color 0.2s;
}

.template-item:last-child {
    border-bottom: none;
}

.template-item:hover {
    background-color: #f5f5f5;
}

.template-item .template-name {
    font-weight: bold;
    color: #2c3e50;
}

.template-item .template-date {
    font-size: 12px;
    color: #7f8c8d;
    margin-top: 3px;
}

/* Status messages */
.status-message {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #2ecc71;
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s;
}

.status-message.error {
    background-color: #e74c3c;
}

.status-message.visible {
    opacity: 1;
}

/* Authentication Form Styles */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 160px); /* Adjust for header and footer */
    padding: 20px;
}

.auth-form {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 30px;
    width: 100%;
    max-width: 400px;
}

.auth-form h2 {
    margin: 0 0 20px 0;
    color: #2c3e50;
    text-align: center;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #2c3e50;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.form-group small {
    display: block;
    margin-top: 4px;
    color: #7f8c8d;
    font-size: 12px;
}

.form-actions {
    margin-top: 30px;
}

.form-actions button {
    width: 100%;
    padding: 14px;
}

.auth-links {
    margin-top: 20px;
    text-align: center;
    color: #7f8c8d;
}

.auth-links a {
    color: #3498db;
    text-decoration: none;
}

.auth-links a:hover {
    text-decoration: underline;
}

.message {
    padding: 12px;
    margin-bottom: 20px;
    border-radius: 4px;
    text-align: center;
}

.message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* User Account Menu */
.user-menu {
    display: flex;
    align-items: center;
    position: relative;
}

.user-menu .username {
    color: white;
    margin-right: 10px;
}

.user-menu .dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: white;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: none;
    z-index: 1000;
    min-width: 150px;
}

.user-menu:hover .dropdown {
    display: block;
}

.user-menu .dropdown a {
    display: block;
    padding: 12px 15px;
    color: #2c3e50;
    text-decoration: none;
    transition: background-color 0.2s;
}

.user-menu .dropdown a:hover {
    background-color: #f5f5f5;
}

/* Subscription badges in header */
.subscription-badge {
    display: flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    margin-right: 10px;
}

.subscription-badge i {
    margin-right: 6px;
}

.active-sub {
    background-color: #d1f7e9;
    color: #0f6848;
    border: 1px solid #baecd8;
}

.expired-sub {
    background-color: #fff3cd;
    color: #664d03;
    border: 1px solid #ffecb5;
}

.no-sub {
    background-color: #f2f2f2;
    color: #555;
    border: 1px solid #ddd;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .footer-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .footer-controls button {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .modal-dialog {
        width: 95%;
        max-width: none;
    }
    
    .auth-form {
        padding: 20px;
    }

    .subscription-badge {
        font-size: 12px;
        padding: 4px 8px;
    }
    
    .main-header nav ul {
        flex-wrap: wrap;
    }
}