/**
 * Sorority Business Directory - Frontend Styles
 */

/* ==========================================================================
   Directory Controls
   ========================================================================== */

.sbd-directory-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
}

.sbd-directory-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    margin-bottom: 20px;
    padding: 20px;
    background: #f7fafc;
    border-radius: 12px;
}

.sbd-search-box {
    position: relative;
    flex: 1;
    min-width: 250px;
}

.sbd-search-input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    font-size: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: #ffffff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.sbd-search-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.sbd-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.1rem;
    color: #a0aec0;
}

.sbd-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.sbd-filter-select {
    padding: 12px 40px 12px 16px;
    font-size: 0.95rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: #ffffff;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%234a5568'%3E%3Cpath d='M7 10l5 5 5-5H7z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 20px;
    transition: border-color 0.2s ease;
}

.sbd-filter-select:focus {
    outline: none;
    border-color: #667eea;
}

.sbd-print-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.sbd-print-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.sbd-reset-btn {
    padding: 10px 20px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #4a5568;
    background: #e2e8f0;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.sbd-reset-btn:hover {
    background: #cbd5e0;
}

.sbd-results-count {
    font-size: 0.95rem;
    color: #718096;
    margin-bottom: 20px;
}

/* ==========================================================================
   Letter Groups (Alphabetical)
   ========================================================================== */

.sbd-letter-group {
    margin-bottom: 40px;
}

.sbd-letter-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.sbd-letter {
    font-size: 2rem;
    font-weight: 700;
    color: #667eea;
    min-width: 50px;
}

.sbd-letter-separator {
    flex: 1;
    height: 3px;
    background: linear-gradient(90deg, #667eea 0%, transparent 100%);
    border-radius: 2px;
}

/* ==========================================================================
   Directory Grid
   ========================================================================== */

.sbd-directory-grid {
    display: grid;
    gap: 24px;
}

.sbd-columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.sbd-columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.sbd-columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 992px) {
    .sbd-columns-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .sbd-columns-3,
    .sbd-columns-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .sbd-directory-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .sbd-search-box {
        min-width: 100%;
    }
    
    .sbd-search-input {
        font-size: 16px;
        padding: 14px 16px 14px 44px;
    }
    
    .sbd-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .sbd-filter-select {
        width: 100%;
        font-size: 16px;
        padding: 14px 44px 14px 14px;
        min-height: 50px;
    }
    
    .sbd-reset-btn,
    .sbd-print-btn {
        width: 100%;
        justify-content: center;
        min-height: 50px;
    }
}

@media (max-width: 576px) {
    .sbd-directory-grid {
        grid-template-columns: 1fr;
    }
    
    .sbd-badge {
        font-size: 0.65rem;
        padding: 3px 8px;
    }
    
    .sbd-category-tag {
        font-size: 0.7rem;
    }
}

/* Business Card */
.sbd-business-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

.sbd-business-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* Logo Section */
.sbd-business-logo {
    width: 100%;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e9f2 100%);
    overflow: hidden;
}

.sbd-business-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sbd-no-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #a0aec0;
}

.sbd-no-logo .dashicons {
    font-size: 64px;
    width: 64px;
    height: 64px;
}

/* Business Info */
.sbd-business-info {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.sbd-business-name {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 12px;
    color: #000000;
    line-height: 1.3;
}

/* Category Tags */
.sbd-business-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.sbd-category-tag {
    display: inline-block;
    padding: 3px 10px;
    background: #edf2f7;
    color: #4a5568;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Ownership Badges */
.sbd-ownership-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.sbd-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sbd-badge-sigma {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
}

.sbd-badge-zeta {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: #ffffff;
}

.sbd-badge-other {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: #ffffff;
}

/* Contact Info */
.sbd-business-address,
.sbd-business-phone,
.sbd-business-website {
    font-size: 0.9rem;
    color: #4a5568;
    margin: 0 0 8px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.4;
}

.sbd-icon {
    flex-shrink: 0;
}

.sbd-business-phone a,
.sbd-business-website a {
    color: #4a5568;
    text-decoration: none;
    transition: color 0.2s ease;
    word-break: break-all;
}

.sbd-business-phone a:hover,
.sbd-business-website a:hover {
    color: #667eea;
}

/* No Results */
.sbd-no-businesses,
.sbd-no-results {
    text-align: center;
    padding: 60px 20px;
    background: #f7fafc;
    border-radius: 12px;
    color: #718096;
    font-size: 1.1rem;
}

/* ==========================================================================
   Submission Form Styles
   ========================================================================== */

.sbd-submission-form-container {
    max-width: 640px;
    margin: 0 auto;
    padding: 20px 0;
}

.sbd-form-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 32px;
    text-align: center;
}

.sbd-form {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    padding: 32px;
}

.sbd-form-row {
    margin-bottom: 24px;
}

.sbd-label {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 8px;
}

.sbd-label .required {
    color: #e53e3e;
}

.sbd-optional {
    font-weight: 400;
    color: #718096;
    font-size: 0.85rem;
}

.sbd-input,
.sbd-textarea,
.sbd-select {
    width: 100%;
    padding: 12px 16px;
    font-size: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: #ffffff;
    color: #1a202c;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.sbd-input:focus,
.sbd-textarea:focus,
.sbd-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.sbd-textarea {
    resize: vertical;
    min-height: 100px;
}

.sbd-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%234a5568'%3E%3Cpath d='M7 10l5 5 5-5H7z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 24px;
    padding-right: 44px;
}

.sbd-field-description {
    font-size: 0.85rem;
    color: #718096;
    margin-top: 6px;
    margin-bottom: 0;
}

/* Logo Dropzone */
.sbd-logo-dropzone {
    border: 2px dashed #e2e8f0;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    background: #f7fafc;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.sbd-logo-dropzone.sbd-dragover {
    border-color: #667eea;
    background: #eef2ff;
}

.sbd-dropzone-text {
    color: #718096;
    margin-bottom: 12px;
}

.sbd-browse-btn {
    display: inline-block;
    padding: 10px 20px;
    background: #667eea;
    color: #ffffff;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s ease;
}

.sbd-browse-btn:hover {
    background: #5a67d8;
}

.sbd-file-input-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.sbd-dropzone-preview {
    position: relative;
    display: inline-block;
}

.sbd-dropzone-preview img {
    max-width: 200px;
    max-height: 200px;
    border-radius: 8px;
}

.sbd-remove-preview {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #e53e3e;
    color: #ffffff;
    border: none;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Checkbox Group */
.sbd-checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.sbd-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    color: #4a5568;
}

.sbd-checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #667eea;
}

/* Submit Button */
.sbd-submit-button {
    width: 100%;
    padding: 14px 24px;
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.sbd-submit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.sbd-submit-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Form Messages */
.sbd-messages {
    margin-top: 20px;
}

.sbd-message {
    padding: 14px 18px;
    border-radius: 8px;
    font-size: 0.95rem;
}

.sbd-message-success {
    background: #c6f6d5;
    color: #22543d;
    border: 1px solid #9ae6b4;
}

.sbd-message-error {
    background: #fed7d7;
    color: #742a2a;
    border: 1px solid #feb2b2;
}

/* Loading State */
.sbd-form.sbd-loading {
    opacity: 0.7;
    pointer-events: none;
}

.sbd-form.sbd-loading .sbd-submit-button::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: 8px;
    border: 2px solid transparent;
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: sbd-spin 0.8s linear infinite;
}

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

/* Honeypot Field */
.sbd-hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* CAPTCHA Input */
.sbd-captcha-input {
    max-width: 150px;
}

/* Mobile Form Optimizations */
@media (max-width: 640px) {
    .sbd-form {
        padding: 24px 20px;
    }
    
    .sbd-input,
    .sbd-textarea,
    .sbd-select {
        font-size: 16px;
        padding: 14px 16px;
    }
    
    .sbd-checkbox-group {
        flex-direction: column;
        gap: 16px;
    }
    
    .sbd-checkbox-label input[type="checkbox"] {
        width: 24px;
        height: 24px;
    }
    
    .sbd-submit-button {
        padding: 16px 24px;
        font-size: 1.1rem;
        min-height: 56px;
    }
}

/* ==========================================================================
   Print Styles - No longer needed, print opens in new tab as text file
   ========================================================================== */
