/* Phone Log Styles - A1 Design System */

/* Main Container */
.phone-log-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Card Styles */
.phone-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin-bottom: 24px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.phone-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.phone-card-header {
    padding: 20px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-bottom: none;
}

.phone-card-header h4,
.phone-card-header h5 {
    margin: 0;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.phone-card-body {
    padding: 24px;
}

/* Search Section */
.search-card-header {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.stats-card-header {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.recent-card-header {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

/* Input Group Styling */
.modern-input-group {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.modern-input-group .form-control {
    border-radius: 8px;
    border: 2px solid #e1e8ed;
    padding: 12px 16px;
    font-size: 15px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.modern-input-group .form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    outline: none;
}

.modern-btn {
    border-radius: 8px;
    padding: 12px 24px;
    font-weight: 500;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.modern-btn-success {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.modern-btn-success:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.modern-btn-outline {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

.modern-btn-outline:hover {
    background: #667eea;
    color: white;
}

/* Stats Display */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.stat-item {
    text-align: center;
    padding: 16px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 8px;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-label {
    font-size: 0.9rem;
    color: #6c757d;
    margin-top: 4px;
}

/* Table Styling */
.modern-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.modern-table thead th {
    background: #f8f9fa;
    padding: 16px;
    text-align: left;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
    position: sticky;
    top: 0;
}

.modern-table tbody tr {
    transition: background-color 0.2s;
}

.modern-table tbody tr:hover {
    background-color: #f8f9fa;
}

.modern-table tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid #e9ecef;
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    gap: 6px;
}

.status-completed {
    background-color: #d4edda;
    color: #155724;
}

.status-callback {
    background-color: #fff3cd;
    color: #856404;
}

.status-scheduled {
    background-color: #d1ecf1;
    color: #0c5460;
}

/* Action Buttons */
.action-btn-group {
    display: flex;
    gap: 8px;
}

.action-btn {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.875rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.action-btn-view {
    background: #e7f3ff;
    color: #0066cc;
}

.action-btn-view:hover {
    background: #0066cc;
    color: white;
}

.action-btn-edit {
    background: #fff4e6;
    color: #ff8c00;
}

.action-btn-edit:hover {
    background: #ff8c00;
    color: white;
}

.action-btn-complete {
    background: #e8f5e9;
    color: #2e7d32;
}

.action-btn-complete:hover {
    background: #2e7d32;
    color: white;
}

/* Search Results */
#searchResults {
    margin-top: 20px;
}

.search-result-item {
    padding: 12px;
    background: #f8f9fa;
    border-left: 4px solid #667eea;
    margin-bottom: 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.search-result-item:hover {
    background: #e9ecef;
    transform: translateX(4px);
}

/* Phone Log SweetAlert2 Modal Styles */

/* Main popup styling */
.phone-log-swal-popup {
    border-radius: 12px !important;
    padding: 0 !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15) !important;
}

.phone-log-view-swal-popup {
    border-radius: 12px !important;
    padding: 0 !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15) !important;
}

/* Title styling with gradient background */
.phone-log-swal-title {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white !important;
    padding: 20px 30px !important;
    margin: 0 !important;
    border-radius: 12px 12px 0 0 !important;
    font-weight: 600 !important;
    font-size: 24px !important;
    text-align: left !important;
}

/* HTML container for form content */
.phone-log-swal-html {
    padding: 25px 30px !important;
    max-height: 70vh !important;
    overflow-y: auto !important;
    text-align: left !important;
}

/* Custom scrollbar for modal content */
.phone-log-swal-html::-webkit-scrollbar {
    width: 8px;
}

.phone-log-swal-html::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.phone-log-swal-html::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.phone-log-swal-html::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Form elements styling */
.phone-log-swal-html .form-control,
.phone-log-swal-html .form-select {
    border: 2px solid #e0e0e0 !important;
    border-radius: 6px !important;
    padding: 10px 15px !important;
    font-size: 15px !important;
    transition: all 0.3s ease !important;
}

.phone-log-swal-html .form-control:focus,
.phone-log-swal-html .form-select:focus {
    border-color: #667eea !important;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.15) !important;
    outline: none !important;
}

/* Label styling */
.phone-log-swal-html .form-label {
    font-weight: 500 !important;
    color: #333 !important;
    margin-bottom: 8px !important;
    font-size: 14px !important;
}

/* Card headers with gradients */
.phone-log-swal-html .swal-card {
    border-radius: 8px;
    margin-bottom: 20px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.phone-log-swal-html .swal-card h6 {
    margin: 0;
    font-weight: 600;
    color: white;
    font-size: 16px;
}

/* Section backgrounds */
.phone-log-swal-html > div[style*="background: #f8f9fa"] {
    transition: transform 0.2s ease;
}

.phone-log-swal-html > div[style*="background: #f8f9fa"]:hover {
    transform: translateY(-2px);
}

/* Textarea styling */
.phone-log-swal-html textarea.form-control {
    min-height: 100px !important;
    resize: vertical !important;
}

/* Existing customer info styling */
#existingCustomerInfo {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Button styling in footer */
.swal2-actions {
    padding: 20px 30px !important;
    background: #f8f9fa;
    border-radius: 0 0 12px 12px !important;
    margin: 0 !important;
    border-top: 1px solid #e0e0e0;
    gap: 10px !important;
}

.swal2-actions .btn {
    padding: 10px 20px !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    border-radius: 6px !important;
    transition: all 0.2s ease !important;
    border: none !important;
    min-width: 120px;
}

.swal2-actions .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
}

.swal2-actions .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4) !important;
}

.swal2-actions .btn-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%) !important;
    color: white !important;
}

.swal2-actions .btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(56, 239, 125, 0.4) !important;
}

.swal2-actions .btn-secondary {
    background: #6c757d !important;
    color: white !important;
}

.swal2-actions .btn-secondary:hover {
    background: #5a6268 !important;
    transform: translateY(-2px);
}

/* Select2 dropdown styling inside SweetAlert */
.select2-container--default .select2-selection--single {
    border: 2px solid #e0e0e0 !important;
    border-radius: 6px !important;
    height: auto !important;
    padding: 8px 15px !important;
}

.select2-container--default .select2-selection--single:focus {
    border-color: #667eea !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 24px !important;
    padding: 0 !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 40px !important;
    top: 0 !important;
    right: 5px !important;
}

/* Select2 dropdown menu */
.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #667eea !important;
}

/* Icon styling in labels */
.phone-log-swal-html .form-label i {
    margin-right: 6px;
    color: #667eea;
}

/* Row spacing */
.phone-log-swal-html .row {
    margin-bottom: 0 !important;
}

/* Customer details box styling */
#customerDetails {
    background: white;
    padding: 15px;
    border-radius: 6px;
    border: 2px solid #e0e0e0;
}

#customerDetails p {
    margin-bottom: 8px;
    color: #333;
    font-size: 14px;
}

#customerDetails strong {
    color: #667eea;
    font-weight: 600;
}

/* Auto-selected company info */
#autoSelectedCompanyInfo {
    background: linear-gradient(135deg, #d4fc79 0%, #96e6a1 100%);
    border: 2px solid #96e6a1;
    border-radius: 8px;
    padding: 12px 15px;
    margin-bottom: 15px;
}

#autoSelectedCompanyInfo i {
    color: #2d7a4d;
}

#autoSelectedCompanyInfo strong {
    color: #1e5631;
}

#autoSelectedCompanyInfo .text-muted {
    color: #4a7c59 !important;
}

/* View-only modal specific styles */
.phone-log-view-swal-popup .phone-log-swal-title {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.phone-log-view-swal-popup .swal-card {
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

/* Animation for modal appearance */
.swal2-show {
    animation: swal2-show 0.3s ease-out !important;
}

@keyframes swal2-show {
    0% {
        transform: scale(0.9);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Responsive Grid */
@media (max-width: 768px) {
    .modern-input-group {
        flex-direction: column;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .action-btn-group {
        flex-direction: column;
    }

    /* SweetAlert2 responsive adjustments */
    .phone-log-swal-popup,
    .phone-log-view-swal-popup {
        width: 95% !important;
        margin: 10px !important;
    }

    .phone-log-swal-title {
        font-size: 20px !important;
        padding: 15px 20px !important;
    }

    .phone-log-swal-html {
        padding: 20px !important;
    }

    .swal2-actions {
        padding: 15px 20px !important;
        flex-direction: column !important;
    }

    .swal2-actions .btn {
        width: 100% !important;
        margin: 5px 0 !important;
    }
}
