/**
 * Modern Public Styles for SF Case Monitor
 */

/* Reset and base styles */
.sf-case-search-form {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    color: rgb(73, 73, 73);
}

.sf-case-search-form h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
    font-weight: 300;
    color: white;
}

.search-row {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 1.5rem;
    align-items: end;
}

.search-field {
    position: relative;
}

.search-field label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.9);
}

.search-field input {
    width: 100%;
    padding: 1rem 1.2rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.search-field input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.search-field input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.1);
}

.search-submit button {
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(238, 90, 36, 0.3);
}

.search-submit button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(238, 90, 36, 0.4);
}

.search-submit button:active {
    transform: translateY(0);
}

/* Case display styles */
.sf-cases-container {
    margin-top: 3rem;
}

.sf-case {
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    overflow: hidden;
    transition: all 0.3s ease;
    padding: 10px;
}

.sf-case:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.sf-case-header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    gap: 32px;
}

.sf-case-header-block {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sf-case-header-block-left h3 {
    margin-bottom: 0;
}

.sf-case-header .sf-case-created,
.sf-case-header .sf-case-modified {
    font-size: 0.95em;
    color: #444;
}

.sf-case-number {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-align: left;
}

.sf-case-status {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    font-size: 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
}

.sf-case-status.new {
    background: linear-gradient(135deg, #74b9ff, #0984e3);
    color: white;
}

.sf-case-status.in-progress {
    background: linear-gradient(135deg, #fdcb6e, #e17055);
    color: white;
}

.sf-case-status.on-hold {
    background: linear-gradient(135deg, #fd79a8, #e84393);
    color: white;
}

.sf-case-status.closed {
    background: linear-gradient(135deg, #00b894, #00a085);
    color: white;
}

.sf-case-details {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    padding: 2rem;
}

.sf-case-info,
.sf-case-dates {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sf-case-info p,
.sf-case-dates p {
    margin: 0;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f1f3f4;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sf-case-info p:last-child,
.sf-case-dates p:last-child {
    border-bottom: none;
}

.sf-case-info strong,
.sf-case-dates strong {
    color: #6c757d;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 120px;
}

.sf-case-description {
    background: #f8f9fa;
    padding: 2rem;
    border-top: 1px solid #e9ecef;
}

.sf-case-description p {
    margin: 0;
    line-height: 1.7;
    color: #495057;
}

.sf-no-cases {
    text-align: center;
    padding: 4rem 2rem;
    color: #6c757d;
    font-size: 1.1rem;
    background: white;
    border-radius: 16px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

/* Loading state */
.sf-loading {
    text-align: center;
    padding: 3rem;
    color: #6c757d;
}

.sf-loading::after {
    content: '';
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Modal styles */
.sf-case-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.sf-case-modal {
    background: white;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    min-width: 400px;
    max-width: 90vw;
    text-align: center;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.sf-case-modal h3 {
    margin: 0 0 1.5rem 0;
    color: #2c3e50;
    font-size: 1.5rem;
    font-weight: 600;
}

.sf-case-modal input {
    width: 100%;
    padding: 1rem 1.2rem;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 1rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.sf-case-modal input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.sf-case-modal button {
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.sf-case-modal button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.sf-case-modal-error {
    color: #e74c3c;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

/* Case Info Sections */
.sf-case-details {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 2rem;
}

.sf-case-section {
    background: #f8f9fa;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    padding: 1.25rem 1.5rem 1.5rem 1.5rem;
    margin-bottom: 0.5rem;
}

.sf-case-section-header {
    font-weight: 700;
    font-size: 1.15rem;
    background: linear-gradient(90deg, #e0e7ff 0%, #c7d2fe 100%);
    color: #2c3e50;
    border-radius: 6px 6px 0 0;
    padding: 0.5rem 1rem;
    margin: -1.25rem -1.5rem 1rem -1.5rem;
    letter-spacing: 0.5px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.sf-case-section-content {
    font-size: 1.08rem;
    color: #222;
    padding-left: 0.25rem;
}

.sf-case-section-subject .sf-case-section-content {
    font-size: 1.25rem;
    font-weight: 500;
    color: #1a237e;
}

.sf-case-contact-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem 2rem;
}

/* Responsive design */
@media (max-width: 768px) {
    .sf-case-search-form {
        margin: 1rem;
        padding: 1.5rem;
        border-radius: 16px;
    }
    
    .search-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .search-submit button {
        width: 100%;
    }
    
    .sf-case-details {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 1.5rem;
    }
    
    .sf-case-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        padding: 1.5rem;
    }
    
    .sf-case-modal {
        margin: 1rem;
        padding: 2rem;
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .sf-case-search-form {
        margin: 0.5rem;
        padding: 1rem;
    }
    
    .sf-case {
        margin-bottom: 1rem;
        border-radius: 12px;
    }
    
    .sf-case-header,
    .sf-case-details,
    .sf-case-description {
        padding: 1rem;
    }
}

@media (max-width: 700px) {
    .sf-case-contact-grid {
        grid-template-columns: 1fr;
    }
    .sf-case-details {
        gap: 1.2rem;
    }
    .sf-case-section {
        padding: 1rem 0.7rem 1.2rem 0.7rem;
    }
    .sf-case-section-header {
        font-size: 1rem;
        padding: 0.5rem 0.7rem;
        margin: -1rem -0.7rem 1rem -0.7rem;
    }
}
