/*
 * Public-facing CSS for Student Result Lookup plugin.
 *
 * @link       https://example.com
 * @since      1.0.0
 *
 * @package    Student_Result_Lookup
 * @subpackage Student_Result_Lookup/public/assets/css
 */

/* Base container for the lookup form and results */
.srl-lookup-container {
    max-width: 700px;
    margin: 30px auto;
    padding: 25px;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    font-family: 'Inter', sans-serif; /* Using Inter font */
    color: #333;
}

/* Heading for the lookup section */
.srl-lookup-container h2 {
    text-align: center;
    color: #333;
    margin-bottom: 25px;
    font-size: 2.2em;
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* Form styling */
.srl-form {
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background-color: #fcfcfc;
}

.srl-form-group {
    margin-bottom: 20px;
}

.srl-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
    font-size: 1.05em;
}

/* Styling for input fields and select dropdown - making them "feel like input fields" */
.srl-form-group input[type="text"],
.srl-form-group select {
    width: 100%;
    padding: 12px 15px; /* More padding for a better feel */
    border: 1px solid #ccc; /* Softer border */
    border-radius: 8px; /* Rounded corners */
    box-sizing: border-box; /* Include padding in width */
    font-size: 1.05em;
    color: #333;
    background-color: #fff;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    -webkit-appearance: none; /* Remove default browser styling for select */
    -moz-appearance: none;
    appearance: none;
}

.srl-form-group input[type="text"]:focus,
.srl-form-group select:focus {
    border-color: #0073aa; /* WordPress blue on focus */
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.2); /* Subtle glow on focus */
}

/* Style for the select dropdown arrow (custom appearance) */
.srl-form-group select {
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%230073aa%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-6.5%200-12.1%204.6-13%2011.1-1%206.5%202%2012.1%208.5%2013l132.8%20132.8c3.2%203.2%207.6%204.8%2012.1%204.8s8.9-1.6%2012.1-4.8L287%2082.4c3.2-3.2%204.8-7.6%204.8-12.1-.1-4.5-1.7-8.9-4.9-12.1z%22%2F%3E%3C%2Fsvg%3E');
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 0.8em;
    padding-right: 30px; /* Space for the custom arrow */
}

/* Submit button styling */
.srl-button {
    display: block;
    width: 100%;
    padding: 15px;
    background-color: #0073aa; /* WordPress blue */
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 115, 170, 0.3); /* Soft shadow */
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.srl-button:hover {
    background-color: #005f8c; /* Darker blue on hover */
    transform: translateY(-2px); /* Slight lift effect */
    box-shadow: 0 6px 15px rgba(0, 115, 170, 0.4);
}

.srl-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(0, 115, 170, 0.2);
}

/* Results display area */
#srl-results-display {
    margin-top: 30px;
    padding: 20px;
    background: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 10px;
    min-height: 100px; /* Ensure it has some height even when empty */
    text-align: center;
    color: #555;
    font-size: 1.1em;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05); /* Inner shadow for depth */
}

.srl-initial-message {
    color: #777;
    font-style: italic;
    padding: 20px;
}

.srl-no-results {
    color: #d63638; /* Red for error/no results */
    font-weight: bold;
    padding: 20px;
}

/* Styling for the result card (when a result is found) */
.srl-result-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 15px;
    text-align: left;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    position: relative; /* For logo positioning */
}

/* College Header (for logo and name) */
.srl-college-header {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.srl-college-logo {
    max-height: 120px; /* Larger logo */
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    margin-bottom: 15px;
}

.srl-college-name {
    color: #0073aa;
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 2em; /* Larger college name */
    font-weight: 700;
    text-align: center;
}

/* Styling for the result table */
.srl-result-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    font-size: 0.95em;
}

.srl-result-table th,
.srl-result-table td {
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
    text-align: left;
    vertical-align: top;
}

.srl-result-table th {
    background-color: #f5f5f5;
    font-weight: bold;
    color: #333;
    width: 35%; /* Give more space to labels */
}

.srl-result-table td {
    background-color: #fff;
    color: #444;
}

.srl-result-table tr:nth-child(even) td {
    background-color: #f9f9f9; /* Alternating row background */
}

.srl-result-table tr:hover td {
    background-color: #f0f8ff; /* Light blue on hover for rows */
}

.srl-result-table strong {
    color: #222;
}

/* Loading indicator */
#srl-loading-indicator {
    padding: 20px;
    font-size: 1.1em;
    color: #666;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .srl-lookup-container {
        margin: 20px 15px;
        padding: 20px;
    }
    .srl-lookup-container h2 {
        font-size: 1.8em;
    }
    .srl-button {
        font-size: 1em;
        padding: 12px;
    }
    .srl-result-card {
        padding: 15px;
    }
    .srl-college-name {
        font-size: 1.6em;
    }
    .srl-result-title {
        font-size: 1.4em;
    }
    .srl-result-table th,
    .srl-result-table td {
        padding: 10px;
        display: block; /* Stack cells on small screens */
        width: 100%;
        box-sizing: border-box;
    }
    .srl-result-table th {
        text-align: left;
        background-color: #f0f0f0;
        border-bottom: none;
    }
    .srl-result-table td {
        border-top: none;
        border-bottom: 1px solid #e0e0e0; /* Add border between stacked cells */
    }
    .srl-result-table tr {
        margin-bottom: 15px;
        display: block;
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        overflow: hidden; /* For rounded corners */
    }
    .srl-result-table tr:nth-child(even) td {
        background-color: #fff; /* Reset alternating background for stacked cells */
    }
    .srl-result-table tr:hover td {
        background-color: #f0f8ff;
    }
}

/* Specific styling for the logo when used as {{college_logo_url}} in a custom template */
.srl-logo {
    max-width: 150px; /* Adjust as needed */
    height: auto;
    display: block;
    margin: 0 auto 20px auto; /* Center it */
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}