/**
 * AT Social Login CSS
 *
 * Styles for the login modal and social login buttons.
 *
 * @package AT_Social_Login
 */

/* Modal container */
.at-social-login-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    display: none;
    padding: 2px;
    box-sizing: border-box;
}

/* Modal Content */
.at-social-login-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8) translateY(-20px);
    background: rgba(255, 255, 255, 0.98);
    padding: 20px;
    border-radius: 16px;
    width: 380px;
    max-width: calc(100vw - 4px);
    max-height: min(610px, calc(100vh - 4px));
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif;
    border: 1px solid rgba(0, 0, 0, 0.08);
    text-align: center;
}

/* Modal Content when visible */
.at-social-login-modal-content.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1) translateY(0);
}

/* Close button */
.at-social-login-close {
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 24px;
    cursor: pointer;
    color: #333;
    transition: color 0.2s ease;
}

.at-social-login-close:hover {
    color: #007aff;
}

/* Modal header */
.at-social-login-modal-header {
    text-align: center;
    margin-bottom: 2px;
}

.at-social-login-modal-header h2 {
    margin: 0 0 2px;
    font-size: 28px;
    font-weight: 600;
    color: #1a1a1a;
    letter-spacing: -0.5px;
}

.at-social-login-modal-header p {
    margin: 0;
    font-size: 16px;
    color: #666;
    font-weight: 400;
}

/* Modal body */
.at-social-login-modal-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* Regular login form */
.at-social-login-regular {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.at-social-login-regular h3 {
    margin: 0 0 2px;
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    text-align: center;
}

.at-social-login-field {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.at-social-login-field label {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.at-social-login-field input {
    padding: 2px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s ease;
}

.at-social-login-field input:focus {
    outline: none;
    border-color: #007aff;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

/* Social login divider */
.at-social-login-divider {
    position: relative;
    text-align: center;
    margin: 2px 0;
}

.at-social-login-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e1e5e9;
}

.at-social-login-divider span {
    background: rgba(255, 255, 255, 0.98);
    padding: 0 2px;
    font-size: 14px;
    color: #666;
    font-weight: 500;
    position: relative;
    z-index: 1;
}

/* Links styling */
.at-social-login-links {
    text-align: center;
    margin-top: 2px;
    font-size: 14px;
}

.at-social-login-links a {
    color: #007aff;
    text-decoration: none;
    font-weight: 500;
}

.at-social-login-links a:hover {
    text-decoration: underline;
}

.at-social-login-separator {
    color: #ccc;
    margin: 0 2px;
}

.at-social-login-submit {
    background: linear-gradient(135deg, #007aff, #0056cc);
    color: #fff;
    padding: 2px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.2s ease;
    width: 100%;
    margin-top: 2px;
}

.at-social-login-submit:hover {
    background: linear-gradient(135deg, #0056cc, #004499);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}

.at-social-login-submit:active {
    transform: translateY(0);
}

/* Links styling */
.at-social-login-links {
    text-align: center;
    margin-top: 8px;
    font-size: 14px;
}

.at-social-login-links a {
    color: #007aff;
    text-decoration: none;
    font-weight: 500;
}

.at-social-login-links a:hover {
    text-decoration: underline;
}

.at-social-login-separator {
    color: #ccc;
    margin: 0 8px;
}

/* Social login buttons */
.at-social-login-social {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.at-social-login-buttons {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.at-social-login-button {
    padding: 5px;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    color: #fff;
    text-align: center;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.at-social-login-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.at-social-login-button:active {
    transform: translateY(0);
}

/* Provider-specific styles */
.at-social-google {
    background: linear-gradient(135deg, #4285f4, #34a853);
    border-color: #4285f4;
}

.at-social-google:hover {
    background: linear-gradient(135deg, #3367d6, #2d8f47);
    border-color: #3367d6;
}

.at-social-facebook {
    background: linear-gradient(135deg, #1877f2, #42a5f5);
    border-color: #1877f2;
}

.at-social-facebook:hover {
    background: linear-gradient(135deg, #166fe5, #1976d2);
    border-color: #166fe5;
}

.at-social-instagram {
    background: linear-gradient(135deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    border-color: #f09433;
}

.at-social-discord:hover {
    background: linear-gradient(135deg, #4752c4, #5b6eae);
    border-color: #4752c4;
}

.at-social-x {
    background: linear-gradient(135deg, #000000, #333333);
    border-color: #000000;
}

.at-social-x:hover {
    background: linear-gradient(135deg, #1a1a1a, #4d4d4d);
    border-color: #1a1a1a;
}

/* Submit Button */
#at-social-login-modal .submit-button {
    width: 100%;
    background: linear-gradient(135deg, #007aff, #005bb5);
    color: #ffffff;
    padding: 10px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    text-align: center;
    display: block;
    margin: 0 auto;
}

#at-social-login-modal .submit-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
}

#at-social-login-modal .submit-button:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Status Messages */
#at-social-login-modal .status-message {
    display: none;
    font-size: 12px;
    margin-top: 5px;
    opacity: 0;
    transition: opacity 0.2s ease;
    text-align: center;
    width: 100%;
}

#at-social-login-modal .error-message {
    color: #ff3b30;
}

#at-social-login-modal .success-message {
    color: #34c759;
}

/* Error display area */
.at-social-login-error {
    margin-bottom: 15px;
}

.at-social-login-error p {
    margin: 0;
    padding: 12px 15px;
    background: #ffeaea;
    border: 1px solid #dc3232;
    border-radius: 6px;
    color: #dc3232;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
}

/* Responsive design */
@media (max-width: 600px) {
    .at-social-login-modal-content {
        width: 95%;
        padding: 15px;
    }

    .at-social-login-modal-header h2 {
        font-size: 20px;
    }
}