/**
 * Blazewrite Public Styles
 * 
 * Main stylesheet for public-facing pages
 * Location: /public/assets/css/blazewrite-public.css
 * 
 * @package    Blazewrite_System
 * @version    2.1.0
 */

/* ==========================================================================
   Base Styles
   ========================================================================== */

.blazewrite-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.blazewrite-page {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* ==========================================================================
   Form Styles
   ========================================================================== */

.blazewrite-form {
    background: #ffffff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
}

.blazewrite-form-group {
    margin-bottom: 24px;
}

.blazewrite-form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
    font-size: 14px;
}

.blazewrite-form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.2s ease;
    background: #ffffff;
}

.blazewrite-form-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.blazewrite-form-input.error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.blazewrite-form-input.success {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.blazewrite-form-error {
    color: #ef4444;
    font-size: 14px;
    margin-top: 5px;
    display: none;
}

.blazewrite-form-help {
    color: #6b7280;
    font-size: 14px;
    margin-top: 5px;
}

/* ==========================================================================
   Button Styles
   ========================================================================== */

.blazewrite-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    min-width: 120px;
    gap: 8px;
}

.blazewrite-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.blazewrite-btn:active {
    transform: translateY(0);
}

.blazewrite-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.blazewrite-btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
}

.blazewrite-btn-primary:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    color: white;
}

.blazewrite-btn-secondary {
    background: #6b7280;
    color: white;
}

.blazewrite-btn-secondary:hover {
    background: #4b5563;
    color: white;
}

.blazewrite-btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.blazewrite-btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: white;
}

.blazewrite-btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.blazewrite-btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
}

.blazewrite-btn-outline {
    background: transparent;
    border: 2px solid #3b82f6;
    color: #3b82f6;
}

.blazewrite-btn-outline:hover {
    background: #3b82f6;
    color: white;
}

.blazewrite-btn-loading {
    position: relative;
    pointer-events: none;
}

.blazewrite-btn-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: blazewrite-spin 1s linear infinite;
}

@keyframes blazewrite-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ==========================================================================
   Card Styles
   ========================================================================== */

.blazewrite-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.2s ease;
}

.blazewrite-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.blazewrite-card-header {
    padding: 24px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.blazewrite-card-title {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
}

.blazewrite-card-body {
    padding: 24px;
}

.blazewrite-card-footer {
    padding: 24px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
}

/* ==========================================================================
   Alert Styles
   ========================================================================== */

.blazewrite-alert {
    padding: 16px 20px;
    border-radius: 8px;
    margin: 16px 0;
    border-left: 4px solid;
    font-size: 14px;
    line-height: 1.5;
}

.blazewrite-alert-success {
    background: #d1fae5;
    border-left-color: #10b981;
    color: #065f46;
}

.blazewrite-alert-error {
    background: #fee2e2;
    border-left-color: #ef4444;
    color: #991b1b;
}

.blazewrite-alert-warning {
    background: #fef3c7;
    border-left-color: #f59e0b;
    color: #92400e;
}

.blazewrite-alert-info {
    background: #dbeafe;
    border-left-color: #3b82f6;
    color: #1e40af;
}

.blazewrite-alert-icon {
    display: inline-block;
    margin-right: 8px;
    font-weight: bold;
}

/* ==========================================================================
   Loading States
   ========================================================================== */

.blazewrite-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #6b7280;
}

.blazewrite-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #e2e8f0;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    animation: blazewrite-spin 1s linear infinite;
    margin-right: 12px;
}

/* ==========================================================================
   Utilities
   ========================================================================== */

.blazewrite-text-center {
    text-align: center;
}

.blazewrite-text-left {
    text-align: left;
}

.blazewrite-text-right {
    text-align: right;
}

.blazewrite-mt-1 { margin-top: 0.25rem; }
.blazewrite-mt-2 { margin-top: 0.5rem; }
.blazewrite-mt-3 { margin-top: 0.75rem; }
.blazewrite-mt-4 { margin-top: 1rem; }
.blazewrite-mt-5 { margin-top: 1.25rem; }
.blazewrite-mt-6 { margin-top: 1.5rem; }

.blazewrite-mb-1 { margin-bottom: 0.25rem; }
.blazewrite-mb-2 { margin-bottom: 0.5rem; }
.blazewrite-mb-3 { margin-bottom: 0.75rem; }
.blazewrite-mb-4 { margin-bottom: 1rem; }
.blazewrite-mb-5 { margin-bottom: 1.25rem; }
.blazewrite-mb-6 { margin-bottom: 1.5rem; }

.blazewrite-p-1 { padding: 0.25rem; }
.blazewrite-p-2 { padding: 0.5rem; }
.blazewrite-p-3 { padding: 0.75rem; }
.blazewrite-p-4 { padding: 1rem; }
.blazewrite-p-5 { padding: 1.25rem; }
.blazewrite-p-6 { padding: 1.5rem; }

.blazewrite-hidden {
    display: none !important;
}

.blazewrite-block {
    display: block !important;
}

.blazewrite-flex {
    display: flex !important;
}

.blazewrite-grid {
    display: grid !important;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 768px) {
    .blazewrite-container {
        padding: 0 16px;
    }
    
    .blazewrite-form {
        padding: 24px;
        margin: 16px 0;
    }
    
    .blazewrite-btn {
        width: 100%;
        margin-bottom: 12px;
    }
    
    .blazewrite-card-header,
    .blazewrite-card-body,
    .blazewrite-card-footer {
        padding: 16px;
    }
}

@media (max-width: 480px) {
    .blazewrite-form {
        padding: 20px;
        border-radius: 8px;
    }
    
    .blazewrite-form-input {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    .blazewrite-btn,
    .blazewrite-alert,
    .blazewrite-loading {
        display: none !important;
    }
    
    .blazewrite-card {
        box-shadow: none;
        border: 1px solid #e2e8f0;
    }
}