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

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

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

.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);
    }
}

@media (max-width: 576px) {
    .sbd-directory-grid {
        grid-template-columns: 1fr;
    }
}

/* 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: #1a202c;
    line-height: 1.3;
}

/* 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;
}

/* 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-business-address:last-child,
.sbd-business-phone:last-child,
.sbd-business-website:last-child {
    margin-bottom: 0;
}

.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 Businesses Message */
.sbd-no-businesses {
    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-form-row:last-child {
    margin-bottom: 0;
}

.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-file-input {
    width: 100%;
    padding: 12px;
    border: 2px dashed #e2e8f0;
    border-radius: 8px;
    background: #f7fafc;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.sbd-file-input:hover {
    border-color: #667eea;
}

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

/* 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:active {
    transform: translateY(0);
}

.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 {
    position: relative;
    color: transparent;
}

.sbd-form.sbd-loading .sbd-submit-button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: sbd-spin 0.8s linear infinite;
}

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

/* ==========================================================================
   Dark Mode Support (Optional)
   ========================================================================== */

@media (prefers-color-scheme: dark) {
    .sbd-business-card {
        background: #2d3748;
    }

    .sbd-business-name {
        color: #f7fafc;
    }

    .sbd-business-address,
    .sbd-business-phone,
    .sbd-business-website {
        color: #cbd5e0;
    }

    .sbd-business-phone a,
    .sbd-business-website a {
        color: #90cdf4;
    }

    .sbd-form {
        background: #2d3748;
    }

    .sbd-form-title,
    .sbd-label {
        color: #f7fafc;
    }

    .sbd-input,
    .sbd-textarea,
    .sbd-select {
        background: #1a202c;
        border-color: #4a5568;
        color: #f7fafc;
    }

    .sbd-checkbox-label {
        color: #cbd5e0;
    }
}
