/* ACF Front Display - Frontend Styles */

/* Container */
.afd-fields-container {
    margin: 30px 0;
    padding: 20px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.afd-group-title {
    margin: 0 0 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #2271b1;
    font-size: 24px;
    font-weight: 600;
    color: #1e1e1e;
}

/* List Style */
.afd-style-list .afd-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.afd-style-list .afd-field-item {
    padding: 15px;
    background: #f9f9f9;
    border-left: 4px solid #2271b1;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.afd-style-list .afd-field-item:hover {
    background: #f0f0f1;
    border-left-color: #135e96;
}

.afd-style-list .afd-field-label {
    font-weight: 600;
    font-size: 14px;
    color: #2271b1;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.afd-style-list .afd-field-value {
    font-size: 15px;
    line-height: 1.6;
    color: #1e1e1e;
}

/* Grid Style */
.afd-style-grid .afd-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.afd-style-grid .afd-grid-item {
    padding: 20px;
    background: #f9f9f9;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.afd-style-grid .afd-grid-item:hover {
    background: #fff;
    border-color: #2271b1;
    box-shadow: 0 4px 8px rgba(34, 113, 177, 0.1);
    transform: translateY(-2px);
}

.afd-style-grid .afd-field-label {
    font-weight: 600;
    font-size: 13px;
    color: #2271b1;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.afd-style-grid .afd-field-value {
    font-size: 15px;
    line-height: 1.5;
    color: #1e1e1e;
}

/* Table Style */
.afd-style-table .afd-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.afd-style-table .afd-table thead th {
    background: #2271b1;
    color: #fff;
    padding: 15px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.afd-style-table .afd-table tbody td {
    padding: 15px;
    border-bottom: 1px solid #e5e5e5;
    font-size: 15px;
    color: #1e1e1e;
}

.afd-style-table .afd-table tbody tr:hover {
    background: #f9f9f9;
}

.afd-style-table .afd-table tbody tr:last-child td {
    border-bottom: none;
}

/* Card Style */
.afd-style-card .afd-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.afd-style-card .afd-card-item {
    padding: 25px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    text-align: center;
    color: #fff;
    transition: all 0.3s ease;
}

.afd-style-card .afd-card-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.afd-style-card .afd-card-icon {
    font-size: 40px;
    margin-bottom: 15px;
}

.afd-style-card .afd-field-label {
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    opacity: 0.9;
}

.afd-style-card .afd-field-value {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
}

/* Field Icons */
.afd-field-icon {
    display: inline-block;
    font-size: 18px;
}

.afd-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Empty Value */
.afd-empty-value {
    color: #999;
    font-style: italic;
}

/* Image Fields */
.afd-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.afd-image:hover {
    transform: scale(1.02);
}

/* Links */
.afd-url-link,
.afd-file-link,
.afd-email-link {
    color: #2271b1;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.afd-url-link:hover,
.afd-file-link:hover,
.afd-email-link:hover {
    color: #135e96;
    text-decoration: underline;
}

/* WYSIWYG Content */
.afd-wysiwyg {
    line-height: 1.8;
}

.afd-wysiwyg p {
    margin-bottom: 15px;
}

.afd-wysiwyg ul,
.afd-wysiwyg ol {
    margin-left: 20px;
    margin-bottom: 15px;
}

.afd-wysiwyg img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

/* Textarea */
.afd-textarea {
    white-space: pre-wrap;
    line-height: 1.6;
}

/* Color Picker */
.afd-color {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 4px;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Repeater */
.afd-repeater {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.afd-repeater-row {
    padding: 12px;
    background: #f9f9f9;
    border-radius: 4px;
    border-left: 3px solid #2271b1;
}

.afd-repeater-item {
    display: inline-block;
    margin-right: 15px;
    font-size: 14px;
}

.afd-repeater-item strong {
    color: #2271b1;
}

/* Map Address */
.afd-map-address {
    padding: 10px 15px;
    background: #f9f9f9;
    border-left: 3px solid #2271b1;
    border-radius: 4px;
    font-style: italic;
}

/* Error Message */
.afd-error {
    padding: 15px;
    background: #fcf0f1;
    border-left: 4px solid #d63638;
    color: #d63638;
    border-radius: 4px;
    font-weight: 500;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .afd-fields-container {
        padding: 15px;
        margin: 20px 0;
    }
    
    .afd-group-title {
        font-size: 20px;
    }
    
    .afd-style-grid .afd-grid {
        grid-template-columns: 1fr;
    }
    
    .afd-style-card .afd-cards {
        grid-template-columns: 1fr;
    }
    
    .afd-style-table .afd-table {
        font-size: 14px;
    }
    
    .afd-style-table .afd-table thead th,
    .afd-style-table .afd-table tbody td {
        padding: 10px;
    }
}

@media screen and (max-width: 480px) {
    .afd-style-list .afd-field-item {
        padding: 12px;
    }
    
    .afd-style-grid .afd-grid-item {
        padding: 15px;
    }
    
    .afd-style-card .afd-card-item {
        padding: 20px 15px;
    }
}

/* Print Styles */
@media print {
    .afd-fields-container {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .afd-style-card .afd-card-item {
        background: #fff;
        color: #000;
        border: 1px solid #000;
    }
    
    .afd-url-link,
    .afd-file-link,
    .afd-email-link {
        text-decoration: underline;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .afd-fields-container {
        background: #1e1e1e;
        border-color: #3e3e3e;
        color: #e5e5e5;
    }
    
    .afd-group-title {
        color: #e5e5e5;
    }
    
    .afd-style-list .afd-field-item {
        background: #2a2a2a;
        color: #e5e5e5;
    }
    
    .afd-style-list .afd-field-item:hover {
        background: #333;
    }
    
    .afd-style-grid .afd-grid-item {
        background: #2a2a2a;
        border-color: #3e3e3e;
        color: #e5e5e5;
    }
    
    .afd-style-grid .afd-grid-item:hover {
        background: #333;
    }
    
    .afd-style-list .afd-field-value,
    .afd-style-grid .afd-field-value {
        color: #e5e5e5;
    }
    
    .afd-style-table .afd-table tbody td {
        color: #e5e5e5;
        border-bottom-color: #3e3e3e;
    }
    
    .afd-style-table .afd-table tbody tr:hover {
        background: #2a2a2a;
    }
}
