/**
 * @file
 * Admin-related css tweaks.
 */


/**
 * ==========================================================================
 * LAYOUT: HomeBox administration page: /admin/borealis
 */

/* Hide the 'Add a block' and 'Save' buttons. We're not using HomeBox for this
 * functionality. */
#homebox-buttons {
  display:none;
}
/* Hide the 'maximize' button on any HomeBox block. */
.homebox .portlet-maximize {
  display:none;
}
/* Hide the 'minimize' button on any HomeBox block. */
.homebox .portlet-minus {
  display:none;
}
/* Disable the ability to minimize the 'Manage Content' block. */
#homebox-block-menu_menu-homebox-manage-content .portlet-minus {
  display:none;
}

/* Give more space (vertically) between HomeBox blocks. */
#homebox .homebox-portlet {
  margin-bottom:2em;
}


/**
 * --------------------------------------------------------------------------
 * STYLE: HomeBox administration page: /admin/vertica
 */

/* Remove the grey background behind each HomeBox column. */
#homebox .homebox-column {
  background:none;
}

/* Make the HomeBox block titles larger. */
.homebox .portlet-title {
  font-size:1.2em;
  padding:1em;
}

/* Add a different colour to the HomeBox blocks which will be most frequently
 * used, to make them stand out.
 *
 * This is likely just the 'Manage Content' block. */
#homebox #homebox-block-menu_menu-homebox-manage-content .portlet-header {
  background:#c8d4f8;
}
#homebox-block-menu_menu-homebox-manage-content .portlet-header:after {
  content: "Typical site administration will probably begin with 'List All Content'.";
  position:relative;
  font-weight:normal;
  padding-left:1.6em;
  top:-1.4em;
}
#homebox-block-menu_menu-homebox-manage-content .portlet-title {
  font-size:1.6em;
}

/* Make more frequently used items stand out. */
#homebox-block-menu_menu-homebox-manage-content li:first-child,
#homebox-block-menu_menu-homebox-add-content li:first-child {
  font-size:1.2em;
  font-weight:bold;
}




/**
 * ==========================================================================
 * LAYOUT: Media thumbnail on node edit forms.
 */
.media-thumbnail,
.media-thumbnail img {
  height:140px;
  max-height:140px;
  width:auto;
}
.page-node-edit .media-thumbnail iframe {
  height:160px;
  max-height:160px;
  width:auto;
}


/**
 * ==========================================================================
 * STYLE: Media thumbnail on Taxonomy Footer Logos edit forms.
 * This is necessary because the logos might be white and transparent, and
 * we won't see them unless we have a background colour.
 */
.field-name-field-footer-logo-file .media-thumbnail {
  background:#999;
}


/**
 * ==========================================================================
 * LAYOUT: Taxonomy pages: Hide fields from 'editor' user (but not from the
 * 'administrator' user).
 */

/* Hide the 'Add vocabulary' link or 'Add term' link. */
.page-admin-structure-taxonomy.role-editor:not(.role-administrator) .action-links,
.page-admin-structure-taxonomy.role-blog:not(.role-administrator) .action-links {
  display:none;
}

/* Allow the 'Add term' link for the editor role on the Blog Topics admin page. */
.page-admin-structure-taxonomy.page-admin-structure-taxonomy-topics.role-editor .action-links {
  display:block;
}

 
/* Hide the 'edit vocabulary' links. */
.page-admin-structure-taxonomy.role-editor:not(.role-administrator) #taxonomy-overview-vocabularies td:nth-child(3),
.page-admin-structure-taxonomy.role-blog:not(.role-administrator) #taxonomy-overview-vocabularies td:nth-child(3) {
  display:none;
}
/* Hide the 'List', 'Edit', 'Manage Fields' and 'Manage Display' tabs from a 
 * taxonomy terms list. */
.page-admin-structure-taxonomy.role-editor:not(.role-administrator) .tabs.primary,
.page-admin-structure-taxonomy.role-blog:not(.role-administrator) .tabs.primary {
  display:none;
}
/* Hide the 'Description' field from a taxonomy term (for every user). */
.page-admin-structure-taxonomy .text-format-wrapper,
.page-taxonomy-term .text-format-wrapper {
  display:none;
}
/* Hide the 'Relations' fieldset from a taxonomy term (for every user). */
.page-admin-structure-taxonomy #edit-relations,
.page-taxonomy-term #edit-relations {
  display:none;
}
/* Hide the taxonomy term 'Delete' button from non-admin users. */
.page-taxonomy-term:not(.role-administrator) #edit-delete {
  display:none;
}







/**
 * ==========================================================================
 * LAYOUT: Text Area and Text Input Filter Formats details.
 */
.form-textarea-wrapper {
  max-width:700px;
}

.text-format-wrapper .filter-wrapper {
  display:none;
}


/**
 * ==========================================================================
 * LAYOUT: Contextual Links: hide them where unnecessary.
 */

/* On the About page, hide the contextual links that lead to a BLOCK, but
 * enable those that link to NODE EDIT links. */
html.js .block-content-about-vertica-header .contextual-links-wrapper,
html.js .block-content-about-vertica-feature .contextual-links-wrapper,
html.js .block-content-about-vertica-community .contextual-links-wrapper,
html.js .block-content-about-vertica-partners .contextual-links-wrapper {
  display:none;
}
html.js .attachment-header .contextual-links-wrapper,
html.js .main-content .contextual-links-wrapper,
html.js .attachment-footer .contextual-links-wrapper {
  display:block;
}

/* Primary nav: hide for non-admin users. */
html.js .role-editor:not(.role-administrator) .block-vertica-menu .contextual-links-wrapper {
  display:none;
}

/* Recently Viewed footer: hide for non-admin users. */
html.js .role-editor:not(.role-administrator) .block-vertica-recent .contextual-links-wrapper {
  display:none;
}

/* FRONT page search block: hide for non-admin users. */
html.js .role-editor:not(.role-administrator) .block-vertica-search .contextual-links-wrapper {
  display:none;
}

/* FRONT page About Vertica blocks: hide the overall wrapper for non-admin users. */
html.js .role-editor:not(.role-administrator) .block-content-front-page .contextual-links-wrapper {
  display:none;
}
html.js .role-editor:not(.role-administrator) .block-content-front-page .view-content .contextual-links-wrapper {
  display:block;
}

/* RENTAL PROPERTIES page Views block header: hide for non-admin users. */
html.js .role-editor:not(.role-administrator) .block-content-rentals-header .contextual-links-wrapper {
  display:none;
}
html.js .role-editor:not(.role-administrator) .block-content-rentals-header .view-content .contextual-links-wrapper {
  display:block;
}
/* RENTAL PROPERTIES page Views block: hide for non-admin users. */
html.js .role-editor:not(.role-administrator) .block-properties-by-city .contextual-links-wrapper {
  display:none;
}

/* CAREERS page Views block header: hide for non-admin users. */
html.js .role-editor:not(.role-administrator) .block-content-careers-header .contextual-links-wrapper {
  display:none;
}
html.js .role-editor:not(.role-administrator) .block-content-careers-header .view-content .contextual-links-wrapper {
  display:block;
}
/* CAREERS page Views block: hide for non-admin users. */
html.js .role-editor:not(.role-administrator) .block-jobs .contextual-links-wrapper {
  display:none;
}

/* PORTAL page Views block header: hide for non-admin users. */
html.js .role-editor:not(.role-administrator) .block-content-portal-header .contextual-links-wrapper {
  display:none;
}
html.js .role-editor:not(.role-administrator) .block-content-portal-header .view-content .contextual-links-wrapper {
  display:block;
}





/**
 * ==========================================================================
 * STYLE: Node Form Group Fieldsets.
 */
/**
 * Node form fieldset colours for common types of fields.
 */
z.group-summary,
z.group-summary.collapsed,
z.group-style-header,
z.group-style-header.collapsed {
  /* Common summary/hero/header values are always in the yellow fieldset. */
  background-color:#ffffd9;
}
z.group-content-header,
z.group-content-header.collapsed {
  /* The core 'content' of a page is always in the green fieldset. */
  background-color:#ddffe1;
}
z.group-attributes,
z.group-attributes.collapsed {
  /* The footer/related/publication fields are always in the grey fieldset. */
  background-color:#f0f0f0;
}
z.group-sponsor-article,
z.group-sponsor-article.collapsed {
  /* The sponsor fieldset is always in the teal/bluish fieldset. */
  background-color:#2c849a;
}
z.group-sponsor-article .fieldset-title {
  color:white;
}


/* Add a visual indicator for groups with required fields. */
fieldset.required .fieldset-title:after {
  content: '*';
  color:#f00;
  font-weight:bold;
  padding-left:.25em;
}




/**
 * File edit form (modal): LAYOUT.
 * 
 * Move the image file tags to the right of the form. This is seen in 2 places:
 * - file upload (iframe)
 * - file edit (modal)
 */
.file-image-form {
  position:relative;
}
.file-image-form .field-name-field-file-tags {
  position:absolute;
  top:0;
  right:0.5em;
  height:auto;
  width:200px;
  padding:1em;
  background-color:#eee;
  border-left:10px solid #ccc;
}
.file-image-form .field-name-field-file-tags .form-item {
  padding:0;
}

/* Make sure the description doesn't site under the file-tags checkboxes. */
.file-image-form .field-name-field-file-image-alt-text .form-item div.description {
  margin-right:260px; /* Width of file-tags + some margin */
}

/* Hide the 'Owned by Property' references, because they're handled automatically. */
.file-image-form .field-name-field-ref-property,
.file-image-form .field-name-field-ref-property-multiple {
  display:none;
}




/**
 * --------------------------------------------------------------------------
 * STYLE: Content by Property View.
 */
.view-admin-properties caption {
  text-align:left;
  font-size:1.6em;
  margin-top:1em;
  margin-bottom:.25em;
  font-weight:bold;
}

.view-admin-properties caption .link {
  font-weight:normal;
  font-size:.7em;
}
