/* Email Template Builder - Main Stylesheet */

:root {
    --primary-color: #0099ff;
    --secondary-color: #007acc;
    --dark-color: #333;
    --light-color: #f8f9fa;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --sidebar-width: 250px;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
    padding-top: 70px; /* For fixed navbar */
}

/* Header Styles */
.header {
    background: white;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

/* Button Styles */
.btn {
    padding: 10px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

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

.form-control {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Alert Styles */
.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

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

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

/* Dashboard Styles */
.dashboard-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background: white;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    height: 100vh;
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 20px;
}

/* Navigation Styles */
.navbar {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-weight: bold;
    color: var(--primary-color) !important;
}

.nav-link {
    font-weight: 500;
    color: #666 !important;
    transition: color 0.3s;
}

.nav-link:hover {
    color: var(--primary-color) !important;
}

.nav-link.active {
    color: var(--primary-color) !important;
    font-weight: 600;
}

/* Card Styles for Packages */
.card {
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid rgba(0, 0, 0, 0.125);
    height: 100%;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1) !important;
}

.card-header.bg-primary {
    background-color: var(--primary-color) !important;
}

/* Pricing Cards Specific */
.display-4, .display-5 {
    color: var(--primary-color);
    font-weight: bold;
}

.text-primary {
    color: var(--primary-color) !important;
}

/* Badge styles */
.badge {
    font-weight: 500;
    padding: 5px 10px;
}

/* Accordion Styles for FAQ */
.accordion-button:not(.collapsed) {
    background-color: rgba(0, 153, 255, 0.1);
    color: var(--primary-color);
    font-weight: 600;
}

.accordion-button:focus {
    box-shadow: 0 0 0 0.25rem rgba(0, 153, 255, 0.25);
    border-color: var(--primary-color);
}

/* Footer Styles */
footer {
    background-color: #343a40 !important;
}

footer a.text-white-50:hover {
    color: white !important;
    text-decoration: none;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .header-content {
        padding: 1rem;
    }
    
    body {
        padding-top: 60px;
    }
    
    .display-4 {
        font-size: 2.5rem;
    }
    
    .display-5 {
        font-size: 2rem;
    }
}

@media (max-width: 576px) {
    .row-cols-lg-3 {
        grid-template-columns: 1fr !important;
    }
    
    .card-body {
        padding: 1rem !important;
    }
}

/* Add to /var/www/emailtemplates/assets/css/style.css */

/* Ticket System Additions */
.ticket-priority-indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 5px;
}

.priority-low { background-color: #4CAF50; }
.priority-medium { background-color: #FF9800; }
.priority-high { background-color: #F44336; }
.priority-urgent { background-color: #9C27B0; }

.ticket-status-indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 5px;
}

.status-open { background-color: #2196F3; }
.status-in_progress { background-color: #FF9800; }
.status-resolved { background-color: #4CAF50; }
.status-closed { background-color: #9E9E9E; }

.ticket-attachment-icon {
    color: #666;
    margin-right: 5px;
}

.ticket-time-ago {
    font-size: 12px;
    color: #888;
    font-style: italic;
}

.ticket-user-role {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    text-transform: uppercase;
    font-weight: bold;
    margin-left: 5px;
}

.role-user { background: #e0e0e0; color: #666; }
.role-admin { background: #2196F3; color: white; }

/* Modal enhancements */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s;
}

.modal-dialog {
    background: white;
    border-radius: 8px;
    max-width: 90%;
    max-height: 90%;
    overflow: auto;
    animation: slideUp 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Form enhancements */
.form-file-preview {
    margin-top: 10px;
    padding: 10px;
    background: #f5f5f5;
    border-radius: 4px;
    display: none;
}

.file-preview-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px;
}

.file-preview-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-preview-size {
    color: #666;
    font-size: 12px;
    margin-left: 10px;
}

.file-preview-remove {
    color: #f44336;
    cursor: pointer;
    margin-left: 10px;
}

/* Loading spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0,0,0,0.1);
    border-radius: 50%;
    border-top-color: #0099ff;
    animation: spin 1s ease-in-out infinite;
}

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

/* Badge styles */
.badge {
    display: inline-block;
    padding: 3px 8px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 10px;
}

.badge-primary {
    background-color: #007bff;
    color: white;
}

.badge-success {
    background-color: #28a745;
    color: white;
}

.badge-warning {
    background-color: #ffc107;
    color: #212529;
}

.badge-danger {
    background-color: #dc3545;
    color: white;
}

.badge-info {
    background-color: #17a2b8;
    color: white;
}

/* Alert styles */
.alert {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

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

.alert-danger {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.alert-warning {
    background-color: #fff3cd;
    border-color: #ffeeba;
    color: #856404;
}

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

/* ====================== */
/* BACK TO TOP BUTTON */
/* ====================== */

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: #0099ff;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    text-decoration: none;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 153, 255, 0.3);
    border: none;
    outline: none;
}

.back-to-top:hover {
    background-color: #007acc;
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 153, 255, 0.4);
}

.back-to-top:active {
    transform: translateY(-2px);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top i {
    line-height: 1;
}

/* Watch Video Button */
.btn-success.position-fixed {
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.btn-success.position-fixed:hover {
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
    transform: translateY(-2px);
}

/* For mobile responsiveness */
@media (max-width: 768px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
    
    .btn-success.position-fixed {
        bottom: 80px;
        left: 20px;
        font-size: 14px;
        padding: 8px 15px;
    }
}

@media (max-width: 480px) {
    .back-to-top {
        bottom: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .btn-success.position-fixed {
        bottom: 70px;
        left: 15px;
        font-size: 12px;
        padding: 6px 12px;
    }
}

/* Package Card Specific Styles */
.card.border-2 {
    border-width: 2px !important;
}

.card-header {
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.card-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.list-unstyled li {
    font-size: 0.9rem;
}

/* Ensure cards are same height */
.h-100 {
    height: 100% !important;
}

/* Improve spacing on packages page */
.page-header {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

/* Make sure accordion looks good */
.accordion-item {
    border: 1px solid rgba(0,0,0,.125);
    margin-bottom: 10px;
}

.accordion-button {
    font-weight: 500;
}

.accordion-body {
    background-color: #f8f9fa;
}

/* =============================================== */
/* REGISTRATION PAGE SPECIFIC STYLES - ADDED FIX */
/* =============================================== */

/* Registration page specific overrides */
body.registration-page {
    padding-top: 0 !important;
    background-color: #f8f9fa !important;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body.registration-page .container.py-5 {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
    flex: 1;
    display: block;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* Ensure registration form is properly containerized */
body.registration-page .col-md-10.col-lg-8 {
    max-width: 800px;
    margin: 0 auto;
}

/* Fix for registration cards */
body.registration-page .card {
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    margin-bottom: 2rem;
    overflow: hidden;
}

body.registration-page .card:last-child {
    margin-bottom: 0;
}

/* Ensure form fields have proper spacing */
body.registration-page .form-group {
    margin-bottom: 1.5rem;
}

body.registration-page .form-control {
    margin-bottom: 1rem;
}

/* Package card fixes */
body.registration-page .package-card {
    height: 100%;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid #dee2e6;
}

body.registration-page .package-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.15);
}

body.registration-page .package-card.selected {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Footer positioning */
body.registration-page footer {
    margin-top: auto;
    position: relative;
    width: 100%;
    flex-shrink: 0;
}

/* Responsive fixes for registration */
@media (max-width: 768px) {
    body.registration-page .container.py-5 {
        padding-top: 1.5rem !important;
        padding-bottom: 1.5rem !important;
    }
    
    body.registration-page .card-body {
        padding: 1.25rem !important;
    }
}

@media (max-width: 576px) {
    body.registration-page .container.py-5 {
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
    }
    
    body.registration-page .card {
        margin-bottom: 1rem;
    }
}