/* General container styling for both admin and frontend */
.tcd-admin-wrap,
.tcd-frontend-container {
    max-width: 800px;
    margin: 20px auto;
    padding: 30px;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    font-family: 'Inter', sans-serif;
    color: #333;
    line-height: 1.6;
}

/* Heading styles */
.tcd-admin-wrap h1,
.tcd-frontend-container h2 {
    text-align: center;
    color: #6a0dad; /* A nice purple */
    margin-bottom: 25px;
    font-size: 2em;
    font-weight: 700;
}

/* Form container */
.tcd-form-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
    margin-bottom: 20px;
}

/* Input field styling */
.tcd-input {
    width: 100%;
    max-width: 450px;
    padding: 12px 18px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
    box-sizing: border-box;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.tcd-input:focus {
    border-color: #8a2be2; /* Blue-violet on focus */
    box-shadow: 0 0 0 3px rgba(138, 43, 226, 0.2);
    outline: none;
}

/* Button styling */
.tcd-button {
    padding: 12px 25px;
    background-color: #8a2be2; /* Blue-violet */
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 10px rgba(138, 43, 226, 0.3);
    font-weight: 600;
}

.tcd-button:hover {
    background-color: #6a0dad; /* Darker purple on hover */
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(138, 43, 226, 0.4);
}

.tcd-button:active {
    background-color: #530a8f;
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(138, 43, 226, 0.3);
}

/* Result message styling */
.tcd-result-message {
    width: 100%;
    max-width: 450px;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    font-size: 1em;
    margin-top: 15px;
    word-wrap: break-word; /* Ensure long URLs wrap */
}

.tcd-result-message.success {
    background-color: #e6ffe6; /* Light green */
    color: #28a745; /* Dark green */
    border: 1px solid #28a745;
}

.tcd-result-message.error {
    background-color: #ffe6e6; /* Light red */
    color: #dc3545; /* Dark red */
    border: 1px solid #dc3545;
}

/* Download link styling */
.tcd-result-message a {
    color: #8a2be2;
    text-decoration: none;
    font-weight: 600;
}

.tcd-result-message a:hover {
    text-decoration: underline;
}

/* Loading spinner */
.tcd-loading-spinner {
    display: none; /* Hidden by default */
    border: 4px solid #f3f3f3; /* Light grey */
    border-top: 4px solid #8a2be2; /* Blue-violet */
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin-top: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .tcd-admin-wrap,
    .tcd-frontend-container {
        padding: 20px;
        margin: 10px;
    }

    .tcd-admin-wrap h1,
    .tcd-frontend-container h2 {
        font-size: 1.8em;
    }

    .tcd-input,
    .tcd-button {
        font-size: 0.9em;
        padding: 10px 20px;
    }
}

/* WordPress Admin Specific Styles */
.tcd-admin-wrap form {
    margin-top: 30px;
    padding: 20px;
    border: 1px solid #eee;
    border-radius: 8px;
    background-color: #f9f9f9;
}

.tcd-admin-wrap .form-table th {
    width: 150px;
    padding-right: 20px;
}

.tcd-admin-wrap .form-table td {
    padding-bottom: 15px;
}

.tcd-admin-wrap .submit {
    padding-top: 20px;
    border-top: 1px solid #eee;
    margin-top: 20px;
}

.tcd-admin-wrap .submit .button-primary {
    background-color: #8a2be2;
    border-color: #6a0dad;
    box-shadow: 0 2px 5px rgba(138, 43, 226, 0.2);
    text-shadow: none;
    height: auto;
    line-height: 1.5;
    padding: 8px 16px;
    font-size: 1em;
    border-radius: 6px;
}

.tcd-admin-wrap .submit .button-primary:hover {
    background-color: #6a0dad;
    border-color: #530a8f;
}
