/* ==========================================================================
   EcoDesign Pro - Common Styles
   Shared styles used across login and dashboard pages
   ========================================================================== */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Font Face */
@font-face {
    font-family: 'Amsi';
    src: url('../fonts/amsi-pro-normal-regular.ttf') format('truetype');
}

/* Base Typography */
body {
    font-family: 'Amsi';
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 500;
}

/* Background Gradient Animation */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    25% {
        background-position: 100% 50%;
    }
    50% {
        background-position: 100% 100%;
    }
    75% {
        background-position: 0% 100%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Common Background Pattern */
.eco-gradient-bg {
    background: linear-gradient(-45deg, #14b8a6, #0d9488, #059669, #047857, #065f46, #064e3b);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

/* Button Styles */
.btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-family: 'Amsi', sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-small {
    padding: 8px 16px;
    font-size: 14px;
}

.btn-secondary {
    background: #6c757d;
}

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

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    font-family: 'Amsi', sans-serif;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Alert Styles */
.alert {
    padding: 15px;
    margin: 15px 0;
    border-radius: 8px;
    font-family: 'Amsi', sans-serif;
}

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

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

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Loading Spinner */
.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s ease-in-out infinite;
    margin-right: 8px;
}

@keyframes spin {
    to { 
        transform: rotate(360deg); 
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.hidden {
    display: none;
}

.visible {
    display: block;
}

/* Role Badges */
.role-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    background: #e2e3e5;
    color: #383d41;
}

.role-admin {
    background: #f8d7da;
    color: #721c24;
}

.role-facilitator {
    background: #fff3cd;
    color: #856404;
}

.role-subscriber {
    background: #d4edda;
    color: #155724;
}

/* Responsive Design */
@media (max-width: 768px) {
    .btn {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px; /* Prevent zoom on iOS */
    }
}